Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cameroncowden/a067f9bd22b25ff5b8ab024eabdf04e0 to your computer and use it in GitHub Desktop.
Save cameroncowden/a067f9bd22b25ff5b8ab024eabdf04e0 to your computer and use it in GitHub Desktop.
A convenient little wrapper for jQuery. Useful for any small page-specific JS tweaks.
(function($){
$(window).load(function(){
//load event is sent when element and all sub-elements have been completely loaded
//includes images, scripts, frames, iframes, and the window object.
//note: care when manipulating elements visible on the initial pageload
});
$(document).ready(function(){
//fires when the dom is ready (page display might be pre- or partially- rendered)
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment