Skip to content

Instantly share code, notes, and snippets.

@kalmas
Created February 1, 2013 18:38
Show Gist options
  • Save kalmas/4693170 to your computer and use it in GitHub Desktop.
Save kalmas/4693170 to your computer and use it in GitHub Desktop.
Proof: JS Doesn't Execute After Navigation
(function () {
var $ = window.jQuery;
function init(){
logIt("1");
setTimeout(function(){logIt("2")}, 1000);
setTimeout(function(){logIt("3")}, 2000);
setTimeout(function(){logIt("4")}, 4000);
setTimeout(function(){logIt("5")}, 6000);
setTimeout(function(){logIt("6")}, 8000);
}
function logIt(message){
$.get("/test.php", { message:eventid });
}
$(document).ready(init);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment