[Resolved] ReferenceError: jQuery is not defined on some pages

Home Forums Support ReferenceError: jQuery is not defined on some pages

  • This topic has 3 replies, 2 voices, and was last updated 5 months ago by Leo.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1245586
    Kim

    Hey there,

    I’m using a plugin to create responsive carousels on the site I’m working on. I’ve created one and used the shortcode to implement it on the homepage and this works fine.

    However, when I try to use it on any other page the slider doesn’t show.

    I checked the javascript console and I’m getting two ‘Uncaught ReferenceError: jQuery is not defined’ errors.

    Having had a look around online it looks like it’s to do with when jQuery loads. On the network tab in Dev Tools I can see that jQuery loads before anything else on the homepage, but this isn’t the case on the other page?

    Unfortunately I’m building this site locally (not sure if this might be part of the problem…) so I cannot share any live links, but I’m happy to send over screenshots if you need me to.

    Many thanks!

    #1245928
    Leo
    Staff
    Customer Support

    Hi there,

    I believe this is the issue:
    https://generatepress.com/forums/topic/jquery-installation/#post-897958

    Let me know if this helps 🙂

    #1246139
    Kim

    Hey Leo,

    Thanks for getting back to me.

    It looks as though jQuery is already installed though, as the script does run on both pages. It’s just that the script doesn’t run first like it does on the homepage?

    Here’s a screenshot of the network tab when loading on a secondary page:

    javascript console

    Many thanks!

    #1246576
    Leo
    Staff
    Customer Support

    I would recommend disabling all plugins to eliminate any conflicts first.

    GP itself cannot cause issues like this.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.