I want to go to the previous page after a 2 second delay using jQuery. I thought maybe I could do it this way but I think ‘m using this in the wrong context. Code doesn’t do anything worthwhile.
function goBack() {
$(this).delay(3000, function(){
history.back();}
return false;
}
The second argument to
delay()is aqueueName, not a function to run after the delay. UsesetTimeoutinstead: