Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › JQuery Issue
This topic contains 7 replies, has 2 voices, and was last updated by Ernest Marcinko 3 years ago.
- AuthorPosts
- March 18, 2020 at 9:41 pm #26292
Hi – I can’t provide login details as this is a localhost project I’m working on. However, the issue I’m experiencing is that I have JQuery enabled on my footer and it does not allow the Ajax pro plugin to work. If I comment out the JQuery it works, but I need JQuery enabled for the site. How can I resolve? Attached please find the Javascript console output. Thanks!
Attachments:
You must be logged in to view attached files.March 19, 2020 at 4:30 am #26294Hi – I pushed my site to a test url and you can see the Ajax Search Pro issue: https://f7aee4de31.nxcli.net/fighters/ – scroll down to the search bar. If you look at the source you will see the issue. The search works in the admin, just need it to work on the site.
Thanks!
March 19, 2020 at 9:21 am #26295Hi,
There is a duplicate jQuery script loaded on the very bottom of the site, that unloads all previous requirements, causing the problem: https://i.imgur.com/hVbfIt5.png
Once you remove that, it will resolve the issues immediately.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 19, 2020 at 5:17 pm #26307Hi Ernest – yes if I remove that, the search works, however it disables the owl carousel which requires JQuery. The JQuery in the footer is the only one I have added to the site, it’s not loaded anywhere else. How do I keep the owl carousel working as well as Ajax Search Pro?
Thanks!
March 20, 2020 at 5:41 am #26313Hi Ernest – just seeing if you had a solution for this that doesn’t break the other use of JQuery? I’m eager to get my site live.
Thanks in advance.
March 20, 2020 at 9:10 am #26314Using two jqueries will eventually break other things as well, you should rather try to substituing the default one to that other one.
Best,
You can try this option, it will probably resolve it, but I would still very strongly recommend not using multiple instances of jqueries at once.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 20, 2020 at 8:43 pm #26332Hi Ernest – that option did fix the issue. I’ll look into ways of just loading 1 jQuery, but I assume since AjaxSearchPro uses jQuery, I’d have to load a no-conflict with it somehow? If you have an idea of how to make AjaxSearchPro use the jQuery I load in the footer, let me know. Thanks!
March 21, 2020 at 10:17 am #26334Unfortunately that is not possible like that. The jQuery in the footer should be moved to the header, replacing the original wordpress jQuery. Noconflict does not help here either, as the original scope is still overwritten.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.