Created
April 14, 2016 09:47
-
-
Save manjufy/b7655b51d4830d2e6f67d6b71e1ee7a5 to your computer and use it in GitHub Desktop.
Ways to Initialise Jquery
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
// Below one, runs the function when the DOM tree is built | |
$(document).ready(function({ | |
// Codes goes here | |
}); | |
$(function() { | |
// Codes goes here | |
}); | |
// Runs the funciton right away | |
(function($){ | |
// code | |
})(jQuery) | |
// same as | |
jQuery(function($) { | |
// Codes goes here | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment