jQuery Code Wrapper for WordPress

When WordPress loads jQuery, it doesn’t provide access to the $ function. Since I’m typically wrapping my code in a .ready() function, here’s the code to get access to the $ function at the same time:

jQuery(document).ready(function( $ ) {
	// Code goes here...
});

This code is posted all over the internet, but it always takes me some time to find it each time, so I’m putting it on my website for the sole purpose of finding it faster in the future.

Posted in

Leave a Comment

Your email address will not be published. Required fields are marked *