Home Forums WoodMart support forum jQuery not working

jQuery not working

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #320052

    atpd23
    Participant

    Hi,

    I can’t make working a jQuery code. I have pasted some code for testing purposes into Custom JS section (see attached image) from the official jQuery web – https://api.jquery.com/height/.

    There is a problem with the line containing variable declaration. If I keep that line, the alert function doesn’t execute. On the other hand, if I remove that line and keep only the alert function, it’s working. But I don’t understand, why the line containing variable declaration isn’t working, because it’s, as I mentioned, from the official site. Also in my local file it’s working properly.

    My Opera browser console panel throw this error: (index):954 Uncaught TypeError: $ is not a function

    Best Regards,
    Andrej

    Attachments:
    You must be logged in to view attached files.
    #320075

    Artem Temos
    Keymaster

    Hello,

    You need to use jQuery notation instead of simple $. For example:

    jQuery( document ).height();

    Kind Regards

Viewing 2 posts - 1 through 2 (of 2 total)