Why cant Dollar symbol be used as an alternative fo jQuery in WordPress?

Why can’t we use “$” instead if jQuery in wordpress? Usually “$” is the alternative of jQuery right? But in WordPress it shows “$” is not a function. I dont get why is that so. Can anyone explain?

Related posts

Leave a Reply

3 comments

  1. Have a look at tip 5 in this web page: 5 Tips for using jquery with wordpress:

    It is important to know that the version of jQuery that comes with
    WordPress automatically calls the jQuery.noConflict(); function, which
    gives control of the $ variable back to whichever library first
    implemented it. If you are loading a different copy of jQuery, you’ll
    need to manually call jQuery.noConflict();, if necessary, from one of
    your JavaScript files.

    I hope that helps.

  2. jQuery(...) should be used instead of $(...)

    Edit —-
    sorry, i misread your question.
    It depends on the jquery implementation of your wordpress version.
    I have seen wordpress sites that allowed the usage of $ before, but i don’t really know what it depends on.