[Resolved] jQuery not defined – how does GP determine when to load jQuery?

Home Forums Support [Resolved] jQuery not defined – how does GP determine when to load jQuery?

Home Forums Support jQuery not defined – how does GP determine when to load jQuery?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #614745
    James

    From threads I’ve read it sounds like GP loads jQuery only when it is needed.

    I’m using Seriously Simple Podcasting, which needs jQuery and it throws a console error because ‘jQuery’ isn’t defined.

    If I activate Twenty Seventeen or manually enqueue jQuery in our child theme functions, it’s all good.

    Is there any risk of it being included twice now that it’s enqueued outside of GP?

    #614747
    David
    Staff
    Customer Support

    Hi James, aside of the use of Sticky Navigation (which will be replaced soon), GP uses vanilla JavaScript. So no concerns about GP adding to the load.

    #614752
    James

    Thanks David. So is wp_enqueue_scripts the right way to be including jquery in this case?

    #614753
    David
    Staff
    Customer Support

    Yep ๐Ÿ™‚

    #614754
    James

    Legend. Thank you ๐Ÿ™‚

    #614755
    David
    Staff
    Customer Support

    You’re welcome.

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