Skip to content

Instantly share code, notes, and snippets.

@misfist
Forked from tommcfarlin/jquery-boilerplate.js
Last active August 29, 2015 14:25
Show Gist options
  • Save misfist/5e38aa10e4c5c95cb79d to your computer and use it in GitHub Desktop.
Save misfist/5e38aa10e4c5c95cb79d to your computer and use it in GitHub Desktop.
WP jQuery Function
/**
* This gist demonstrates how to properly load jQuery within the context of WordPress-targeted JavaScript so that you don't
* have to worry about using things such as `noConflict` or creating your own reference to the jQuery function.
*
* @version 1.0
*/
(function( $ ) {
"use strict";
$(function() {
// Your code here
});
}(jQuery));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment