Skip to content

Instantly share code, notes, and snippets.

@irazasyed
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save irazasyed/11308161 to your computer and use it in GitHub Desktop.
Save irazasyed/11308161 to your computer and use it in GitHub Desktop.
jQuery: Load jquery properly within the context of WordPress-targeted JavaScript without using noConflict.
// remap jQuery to $
(function($){
"use strict";
/* trigger when page is ready */
$(document).ready(function (){
// your functions go here
});
/* optional triggers
$(window).load(function() {
});
$(window).resize(function() {
});
*/
})(window.jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment