jQuery self executing function

External jQuery script.
This Function is called when the DOM is ready.

$(document).ready( function() {
});

Shorthand.

(function($) {
});
jQuery(function(){
});

Run a function when the page is fully loaded including graphics

$(window).load(function () {
});

WordPress jQuery

jQuery.noConflict();
  jQuery(document).ready(function($) {
    // Code that uses jQuery's $ can follow here.
  });

References
stackoverflow
jQuery noConflict

Advertisements