// jspsych.js // // Josh de Leeuw and Drew Hendrickson // Percepts and Concepts Lab, Indiana University // (function( $ ) { jsPsych = (function() { // // public object // var core = {}; // // private class variables // // options var opts = {}; // exp structure var exp_blocks = []; // flow control var curr_block = 0; // everything loaded? var initialized = false; // target DOM element var DOM_target; // // public methods // core.init = function($this, options){ // import options opts = $.extend({}, jsPsych.defaults, options); // set target DOM_target = $this; run(); /* * load scripts dynamically?? * * // load plugin script files var scripts_loaded = 0; // load all of the plugins that are defined in the opts["plugins"] for(var j = 0; j < opts["plugins"].length; j++) { $.getScript(opts["plugins"][j]["src"], function(){ scripts_loaded++; if(scripts_loaded==opts["plugins"].length) { intialized = true; run(); } }); }*/ } core.data = function(){ var all_data = []; for(var i=0;i