Created
February 1, 2013 18:38
-
-
Save kalmas/4693170 to your computer and use it in GitHub Desktop.
Proof: JS Doesn't Execute After Navigation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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