call function example

This commit is contained in:
Josh de Leeuw 2015-02-18 13:23:42 -05:00
parent a8804d2e2b
commit fafa254860
2 changed files with 27 additions and 1 deletions

View File

@ -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>

View 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>