18
Aug
2009
WordPress & jQuery: “$ is not a function”
If you are trying to add your own jQuery code to WordPress, and have had the error “$ is not a function” show up on Firebug, here is the fix:
Convert all dollar signs ($) to ‘jQuery’
The dollar sign is reserved in WordPress for the Prototype library, which is why it errors out. For example, instead of:
$().ready(function() {
$("#select_me").show();
});
Change it to:
jQuery().ready(function() {
jQuery("#select_me").show();
});




lol….
Thanks alot.
I change $ -> $$
Because when I used jQuery appear “is not a function”.
BR,
little rangda
Thanks this saved me a ton of time and worked fine, didn’t have to use $$ like the other commenter suggested.
dont both with this lot. do it like this:
(function($) {
// your code with dollars here
})( jQuery );
enclose your code in this type of structure.
thanks too much..
This saved me some hassle, thanks mate!