I have a pool of 23 different .html files, and I need to access them randomly. That part was easy, but I need them to link to a different page after 40 of these pages have been shown. How can I do this?
var startTime = new Date();
Mousetrap.bind('e', function () {
var endTime = new Date();
var timeSpent = (endTime - startTime);
alert("Correct " + timeSpent + "miliseconds");
window.location.href = loft;
})
Mousetrap.bind('i', function() {
var endTime = new Date();
var timeSpent = (endTime - startTime);
$('img').css('display','block')
alert("Incorrecto " + timeSpent + "milisegundos");
})
var loft= Math.floor((Math.random()*40)+1);
Mousetrap is a js library that alows me to link key strokes to different functions. This is a social psycology study on reaction time.