Plugins for jspsych@6.1
This commit is contained in:
39
tests/test_jspsych-html-keyboard-response-clickable.html
Normal file
39
tests/test_jspsych-html-keyboard-response-clickable.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Test for jspsych-html-keyboard-response-clickable</title>
|
||||
<script src="https://cdn.jsdelivr.net/gh/jspsych/jsPsych@6.2.0/jspsych.js"></script>
|
||||
<link href="https://cdn.jsdelivr.net/gh/jspsych/jsPsych@6.2.0/css/jspsych.css" rel="stylesheet" type="text/css">
|
||||
<script src="../plugins/jspsych-html-keyboard-response-clickable.js"></script>
|
||||
<style>
|
||||
.clickable {
|
||||
font-size: 90%;
|
||||
color: rgb(103,161,208);
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function(event) {
|
||||
|
||||
var test_trial = {
|
||||
type: 'html-keyboard-response-clickable',
|
||||
choices: [32],
|
||||
stimulus: '<p>STIMULUS</p><p class="clickable">(Click here)</p>',
|
||||
on_finish: function(){
|
||||
console.log("Trial is finished.");
|
||||
}
|
||||
};
|
||||
|
||||
jsPsych.init({
|
||||
timeline: [test_trial]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user