Site logo

Archived topic

jquery code causing conflicts even when moved to code snippets

7 replies · Started by Jason on March 6, 2023

Viewing posts 1–8 of 8

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>
<script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>

<link rel="stylesheet" href="https://code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">

</head>
</html>

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:

https://www.screencast.com/t/0CIjP7WTUZ

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

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.

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

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>
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script>

<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css">

</head>

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

Hi David,

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

You're welcome

This archived topic is closed to new replies.