Skip to content

Instantly share code, notes, and snippets.

@jshaw
Created August 2, 2012 19:55
Show Gist options
  • Save jshaw/3240109 to your computer and use it in GitHub Desktop.
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).
// 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