Merge pull request #317 from jodeleeuw/no-jquery

Remove all jQuery, implement testing framework
This commit is contained in:
Josh de Leeuw 2017-01-04 15:42:47 -05:00 committed by GitHub
commit a89b993efe
133 changed files with 1427 additions and 761 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
node_modules/
.DS_Store
Thumbs.db

3
.travis.yml Normal file
View File

@ -0,0 +1,3 @@
language: node_js
node_js:
- "6.6"

View File

@ -32,7 +32,7 @@ Wondering if jsPsych can be used for research that depends on accurate response
* [de Leeuw, J. R., & Motz, B. A. (2016). Psychophysics in a Web browser? Comparing response times collected with JavaScript and Psychophysics Toolbox in a visual search task. *Behavior Research Methods*, *48*(1), 1-12.](http://link.springer.com/article/10.3758%2Fs13428-015-0567-2)
* [Hilbig, B. E. (in press). Reaction time effects in lab- versus web-based research: Experimental evidence. *Behavior Research Methods*.](http://dx.doi.org/10.3758/s13428-015-0678-9)
* [Pinet, S., Zielinski, C., Mathôt, S. et al. (in press). Measuring sequences of keystrokes with jsPsych: Reliability of response times and interkeystroke intervals. *Behavior Research Methods*.](http://link.springer.com/article/10.3758/s13428-016-0776-3)
* [Reimers, S., & Stewart, N. (2014). Presentation and response time accuracy in Adobe Flash and HTML5/JavaScript Web experiments. *Behavior Research Methods*, *47*(2), 309-327.](http://link.springer.com/article/10.3758%2Fs13428-014-0471-1)
* [Reimers, S., & Stewart, N. (2015). Presentation and response time accuracy in Adobe Flash and HTML5/JavaScript Web experiments. *Behavior Research Methods*, *47*(2), 309-327.](http://link.springer.com/article/10.3758%2Fs13428-014-0471-1)
Credits

View File

@ -12,11 +12,25 @@
flex-direction: column;
justify-content: center;
align-items: center;
height: 100%;
width: 100%;
/*height: 100%;
width: 100%;*/
overflow-y: scroll;
}
.jspsych-content-wrapper {
display: flex;
justify-content: center;
align-items: center;
flex: 1 1 100%;
width: 100%;
}
.jspsych-content {
max-width: 95%; /* this is mainly an IE 10-11 fix */
text-align: center;
/*margin: auto;*/
}
.jspsych-top {
align-items: flex-start;
}
@ -25,19 +39,7 @@
align-items: center;
}
.jspsych-content {
max-width: 95%; /* this is mainly an IE 10-11 fix */
text-align:center;
margin: auto;
}
.jspsych-content-wrapper {
display: flex;
justify-content: center;
align-items: center;
flex: 1 1 auto;
width: 100%;
}
/* fonts and type */

View File

@ -166,7 +166,6 @@ var after_block = {
}
jsPsych.init({
display_element: $('#jspsych-target'),
timeline: [block, after_block],
on_finish: function() {
jsPsych.data.displayData();
@ -264,7 +263,7 @@ None.
### Return value
Returns the jQuery-object that contains the DOM element used for displaying the experiment.
Returns the HTML DOM element used for displaying the experiment.
### Description
@ -276,7 +275,7 @@ Get the DOM element that displays the experiment.
var el = jsPsych.getDisplayElement();
// hide the jsPsych display
el.hide();
el.style.visibility = 'hidden';
```
---
## jsPsych.init
@ -296,7 +295,7 @@ The settings object can contain several parameters. The only *required* paramete
Parameter | Type | Description
--------- | ---- | -----------
timeline | array | An array containing the objects that describe the experiment timeline. See [Creating an Experiment: The Timeline](../features/timeline.md).
display_element | jQuery object | A jQuery-selected DOM element, e.g., `$('#target')` selects the element with the `id='target'` attribute. If left blank, then jsPsych will use the `<body>` element to display content (creating it if necessary). You can override this parameter at the trial level as well by specifying a display_element property on any timeline.
display_element | string | The ID of an HTML element to display the experiment in. If left blank, then jsPsych will use the `<body>` element to display content (creating it if necessary). You can override this parameter at the trial level as well by specifying a display_element property on any timeline.
on_finish | function | Function to execute when the experiment ends.
on_trial_start | function | Function to execute when a new trial begins.
on_trial_finish | function | Function to execute when a trial ends.

View File

@ -283,7 +283,6 @@ var after_if_trial = {
}
jsPsych.init({
display_element: $('#jspsych-target'),
timeline: [pre_if_trial, if_node, after_if_trial],
on_finish: function(){jsPsych.data.displayData(); }
});

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-text.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-text.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
@ -55,7 +55,8 @@
jsPsych.init({
timeline: [loop_node, pre_if_trial, if_node, after_if_trial],
on_finish: function(){jsPsych.data.displayData(); }
on_finish: function(){jsPsych.data.displayData(); },
default_iti: 200
});
</script>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-text.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-text.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
<style>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -2,7 +2,7 @@
<html>
<head>
<title>Flanker Task</title>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-text.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>

View File

@ -2,7 +2,6 @@
<html>
<head>
<title>My experiment</title>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-text.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
<style>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
<style>
@ -23,7 +23,6 @@
// should get error message in console about no plugin loaded
jsPsych.init({
display_element: $('#jspsych-target'),
timeline: [block_1]
});

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -2,15 +2,12 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-text.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
</head>
<body>
<div id="jspsych-target"></div>
</body>
<script>
var block_1 = {
type: 'text',
@ -19,7 +16,6 @@
}
jsPsych.init({
display_element: $('#jspsych-target'),
timeline: [block_1],
fullscreen: true,
on_finish: function() {

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-text.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-text.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 234 KiB

After

Width:  |  Height:  |  Size: 234 KiB

View File

Before

Width:  |  Height:  |  Size: 231 KiB

After

Width:  |  Height:  |  Size: 231 KiB

View File

Before

Width:  |  Height:  |  Size: 339 KiB

After

Width:  |  Height:  |  Size: 339 KiB

View File

Before

Width:  |  Height:  |  Size: 177 KiB

After

Width:  |  Height:  |  Size: 177 KiB

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.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

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-button-response.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -1,7 +1,7 @@
<!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>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-categorize-animation.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-categorize.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -1,11 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-free-sort.js"></script>
<link rel="stylesheet" href="css/jquery-ui.css"></link>
<link rel="stylesheet" href="../css/jspsych.css"></link>
</head>
<script>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-html.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
@ -16,7 +16,7 @@
*/
var check_consent = function(elem) {
if ($('#consent_checkbox').is(':checked')) {
if (document.getElementById('consent_checkbox').checked) {
return true;
} else {
alert("If you wish to participate, you must check the box next to the statement 'I agree to participate in this study.'");

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-instructions.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-multi-stim-multi-response.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<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-palmer.js"></script>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-reconstruction.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-same-different.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-serial-reaction-time.js"></script>
<script src="../plugins/jspsych-text.js"></script>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-similarity.js"></script>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-audio.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-survey-likert.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-survey-multi-choice.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-survey-text.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-text.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-video.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -2,7 +2,7 @@
<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-text.js"></script>

View File

@ -2,7 +2,7 @@
<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-vsl-animate-occlusion.js"></script>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<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-vsl-grid-scene.js"></script>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-xab.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-text.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-text.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>

View File

@ -1,8 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>
<script src="../plugins/jspsych-text.js"></script>
@ -12,7 +10,7 @@
width: 300px;
}
</style>
</head>
<script>
var trial_1 = {
type: 'single-stim',
@ -52,12 +50,12 @@
jsPsych.init({
timeline: [trial_1, trial_2, trial_3, block_set, end_screen],
timeline: [trial_1, trial_2, trial_3], //block_set, end_screen],
show_progress_bar: true,
on_finish: function() {
jsPsych.data.displayData();
}
});
</script>
</head>
</html>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
<style>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-text.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
@ -32,7 +32,6 @@
}
jsPsych.init({
display_element: $('#jspsych-target'),
timeline: [first,overall],
default_iti: 0,
on_finish: function() { jsPsych.data.displayData(); }

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
@ -42,7 +42,6 @@
}
jsPsych.init({
display_element: $('#jspsych-target'),
timeline: [node],
on_finish: function() {
jsPsych.data.displayData();

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>
<script src="../plugins/jspsych-single-audio.js"></script>
@ -47,7 +47,6 @@
jsPsych.pluginAPI.preloadAudioFiles(['sound/sound.mp3','sound/hammer.mp3'], function() {
jsPsych.init({
display_element: $('#jspsych-target'),
timeline: [node],
on_finish: function() {
jsPsych.data.displayData();

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
@ -38,7 +38,6 @@
}
jsPsych.init({
display_element: $('#jspsych-target'),
timeline: [block_1],
on_finish: function() {
jsPsych.data.displayData();

View File

@ -2,7 +2,7 @@
<html>
<head>
<script src="js/jquery.min.js"></script>
<script src="../jspsych.js"></script>
<script src="../plugins/jspsych-single-stim.js"></script>
<link rel="stylesheet" href="../css/jspsych.css"></link>
@ -29,7 +29,7 @@
var trial_3 = {
stimulus: '<p>:)</p>',
is_html: true,
display_element: $('#jspsych-trial-target')
display_element: 'jspsych-trial-target'
}
var node = {
@ -44,7 +44,7 @@
jsPsych.init({
display_element: $('#jspsych-target'),
display_element: 'jspsych-target',
timeline: [node],
on_finish: function() {
jsPsych.data.displayData();

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2015 Joshua R. de Leeuw
Copyright (c) 2014-2017 Joshua R. de Leeuw
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

25
package.json Normal file
View File

@ -0,0 +1,25 @@
{
"name": "jspsych",
"version": "6.0.0",
"description": "Behavioral experiments in a browser",
"main": "jspsych.js",
"directories": {
"doc": "docs"
},
"scripts": {
"test": "jest"
},
"repository": {
"type": "git",
"url": "git+https://github.com/jodeleeuw/jsPsych.git"
},
"author": "Josh de Leeuw",
"license": "MIT",
"bugs": {
"url": "https://github.com/jodeleeuw/jsPsych/issues"
},
"homepage": "https://github.com/jodeleeuw/jsPsych#readme",
"devDependencies": {
"jest": "^17.0.3"
}
}

Some files were not shown because too many files have changed in this diff Show More