Created
August 2, 2012 19:55
-
-
Save jshaw/3240109 to your computer and use it in GitHub Desktop.
Checking execution order based on document and window ready / load state within a Facebook iFrame canvas ( page tab or app).
This file contains 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
// Checking execution order based on document and window ready / load state within a Facebook iFrame canvas ( page tab or app). | |
// Executes 1st | |
// Same as $(document).ready(function(){}); | |
$(function() { | |
alert('1'); | |
}); | |
// Executes 2nd | |
$(window).load(function() { | |
alert('2'); | |
}); | |
// Executes 3rd | |
window.onload = function() { | |
alert('3'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment