Hello,
Following the tutorial, I pasted the following code directly from the site into a TextMate file, saved, and attempted to open it in Chrome (also tried Firefox/Safari). However, the screen is blank, instead of displaying 'Hello World'. (The experiment file and the jspsych-5.0.3 file are in the same folder.) Would appreciate your guidance on why this is happening! Thanks.
<!doctype html>
<html>
<head>
<title>My experiment</title>
<script src="jspsych-5.0/jspsych.js"></script>
<script src="jspsych-5.0/plugins/jspsych-text.js"></script>
<link href="jspsych-5.0/css/jspsych.css" rel="stylesheet" type="text/css"></link>
</head>
<body>
</body>
<script>
var hello_trial = {
type: 'text'
text: 'Hello world!'
}
jsPsych.init)({
timeline: [hello_trial]
})
</script>
</html>
PS:
To rule out further issues, I ran this basic script successfully:
<!doctype html>
<html>
<head>
<title>My experiment</title>
<script src="jspsych-5.0/jspsych.js"></script>
<script src="jspsych-5.0/plugins/jspsych-text.js"></script>
<link href="jspsych-5.0/css/jspsych.css" rel="stylesheet" type="text/css"></link>
</head>
<body>
<h1> My First Heading!</h1>
<p>My first paragraph!!</p>
</body>
</html>