Skip to content

Instantly share code, notes, and snippets.

@aj-adl
Created January 13, 2015 22:39
Show Gist options
  • Save aj-adl/d798429c42a181e4e37f to your computer and use it in GitHub Desktop.
Save aj-adl/d798429c42a181e4e37f to your computer and use it in GitHub Desktop.
Standard jQuery noConflict wrapper - waits till $.ready event before executing. Very common in WP JS code
jQuery(document).ready(function($) {
// Inside of this function, $() will work as an alias for jQuery()
// and other libraries also using $ will not be accessible under this shortcut
// Put your code here e.g. $('#page').find('.comments').each( myFunc()); etc
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment