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…

It's only fair to share...Tweet about this on TwitterShare on FacebookEmail this to someoneShare on Google+
This entry was posted in jQuery, WordPress and tagged , . Bookmark the permalink.