Forums › Forums › Search & Filter Pro › Conflict with jquery.min.js
Tagged: conflict, jquery.min.js
- This topic has 6 replies, 2 voices, and was last updated 8 years, 9 months ago by Ross.
-
Anonymous(Private) February 12, 2016 at 10:55 am #36831
Hello,
I use a custom theme for wordpress,
your plugins works very well with my theme.But when I use jquery -> jquery.min.js
there is a bug.
I tried with the themes by default wordpress, it works, I have no problem with other puglins
The problem just when I put in my file footer.php
jquery.min.js
search engine, do not load the information
do you have an idea?
Thank you
Ross Moderator(Private) February 12, 2016 at 12:04 pm #36843Hi there
Why are you adding a jquery.min.js to your site? WordPress comes with this automatically.
Thanks
Ross Moderator(Private) February 15, 2016 at 10:15 pm #37031Hey there
If I take a look now the search is working?
On any website, loading a second copy of jQuery is an issue, and is totally bad practice.
WordPress automatically loads its own copy (which you can find) on line 83 on your site:
<script type='text/javascript' src='http://www.example.com/wp-includes/js/jquery/jquery.js?ver=1.11.3'></script>
I don’t know what the issue is with teh other other jQuery, but like I say, this is prone to issues on WP unless you know what you are doing.
WP has tons of javascript, that is loaded using dependencies – https://developer.wordpress.org/reference/functions/wp_enqueue_script/ – plugins use these dependencies to load at the correct point in the code.
I’m assuming the way you are trying to do things does not preserve the dependencies in WP.
Thanks
-
AuthorPosts