Site logo

[Support request] jquery code causing conflicts even when moved to code snippets

Home Forums Support [Support request] jquery code causing conflicts even when moved to code snippets

Home Forums Support jquery code causing conflicts even when moved to code snippets

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2557193
    Jason

    Hi there,

    I moved this below code from my header.php file to a code snippet, and even then it’s causing conflicts where I cant have a members area with woocommerce or even Ultimate membership Pro. As soon as I disable the code snippet, then membership registrations work fine. I’ve been at this thing for 2 weeks now.
    Any idea how I can use both the jquery library on my site and not have these conflicts with membership plugins like Woocommerce or UMP?

    <html>

    <head>
    <script src=”https://code.jquery.com/jquery-3.6.0.min.js”></script&gt;
    <script src=”https://code.jquery.com/ui/1.13.2/jquery-ui.js”></script&gt;

    <link rel=”stylesheet” href=”https://code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css”&gt;

    </head>
    </html>

    #2557297
    David
    Staff
    Customer Support

    Hi there,

    what is you want to do with that code?

    As the issue i see on the site is coming from the main.js:

    2023-03-06_12-15-11

    And this is due to the $ variable has not been declared. In WordPress that either needs declaring or changing the jQuery

    #2558622
    Jason

    Hi David,

    it’s so the the sliders work on the scriptwriter form, https://cheekyfans.com/tester/, as this form will be the main feature of the site, if I don’t have Jquery in there, the sliders disappear.

    Ok thanks, I will take a look at the main.js file.

    #2558758
    David
    Staff
    Customer Support

    Yeah, that jquery error needs fixing, with that error the browser won’t fire any further jQuery scripts.

    #2558767
    Jason

    I replaced the all the ‘$’ with JQuery. Though that hasn’t fixed the conflict, as submitting any posts from the front, client side, doesn’t work.
    I can only submit new posts from the home page, as that is immune from the code snippet (below) that holds the Jquery library script tags.

    head>
    <script src=”https://code.jquery.com/jquery-3.5.1.min.js”></script&gt;
    <script src=”https://code.jquery.com/ui/1.12.0/jquery-ui.js”></script&gt;

    <link rel=”stylesheet” href=”https://code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css”&gt;

    </head>

    #2559896
    David
    Staff
    Customer Support

    If you right click > inspect the site and check in the browser developers tools > Console there are more errors related to $ variable in jQuery

    #2563711
    Jason

    Hi David,

    Yeah, just been looking the last couple of days. thanks for that

    #2563981
    David
    Staff
    Customer Support

    You’re welcome

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