Using “jQuery” instead of “$” in WordPress

In jQuery, the dollar sign character ($) is a shortcut used to represent “jQuery”. You can start your expressions like this:


But, other JS libraries and frameworks also use this character, so with WordPress you must use “JQuery” instead of “$”.


There is a workaround where you can wrap the code in an anonymous function and still use “$”.

(function($) {
})( jQuery );

read more…

Thank you for reading!

It's only fair to share...Tweet about this on Twitter
Share on Facebook
Email this to someone
This entry was posted in jQuery, WordPress and tagged , . Bookmark the permalink.