Created
October 24, 2013 16:30
-
-
Save karloscarweber/7140427 to your computer and use it in GitHub Desktop.
All th ways to make a document.ready() event listener for Jquery. see: http://api.jquery.com/ready/ I've had to look this up enough times that I decided to store it somewhere. I don't know why I always forget
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
/*Classic way*/ // $( document ).ready( handler ) | |
$( document ).ready( function( ) { | |
// do something. | |
} ) | |
/* Short Way */ // $( handler ) | |
$( function( ) { | |
// do something | |
}) | |
// personally I prefer the short way. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment