mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-12 00:28:11 +00:00
call function example
This commit is contained in:
parent
a8804d2e2b
commit
fafa254860
@ -2,7 +2,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<script src="js/snap.svg-min.js"></script>
|
||||
<script src="../jspsych.js"></script>
|
||||
<script src="../plugins/jspsych-animation.js"></script>
|
||||
<link rel="stylesheet" href="../css/jspsych.css"></link>
|
||||
|
27
tests&examples/jspsych-call-function.html
Normal file
27
tests&examples/jspsych-call-function.html
Normal file
@ -0,0 +1,27 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<script src="../jspsych.js"></script>
|
||||
<script src="../plugins/jspsych-call-function.js"></script>
|
||||
<link rel="stylesheet" href="../css/jspsych.css"></link>
|
||||
</head>
|
||||
<body>
|
||||
<div id="jspsych-target"></div>
|
||||
</body>
|
||||
<script>
|
||||
|
||||
var trials = {
|
||||
type: 'call-function',
|
||||
func: function(){ alert('plugin is working.')}
|
||||
};
|
||||
|
||||
|
||||
jsPsych.init({
|
||||
display_element: $('#jspsych-target'),
|
||||
experiment_structure: [trials]
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user