Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Jquery conflict › Reply To: Jquery conflict
Hi,
Well, I don’t know it it’s related, but I see 2 instances of jQuery loaded within the same scope. One is after this line in the header:
<!-- Some inline Javascript for fast loadings -->
The other is the built-in jQuery. I believe the first one should not be there at all.
Then if I try to access:
$.fn.velocity
in the console, it returns undefined – which suggests that the script is not loaded, but
jQuery.fn.velocity
returns a function. Meaning that the $ scope is a different jQuery or the velocity script is not loaded there.
—–
1. I would recommend removing the first instance of the jQuery, it’s unneccessary, and it’s overwritten by the built-in jquery anyways.
2. Try changing the ready statement you use in the header from:
$(document).ready(function(){
to
jQuery(document).ready(function($){
It’s much better, as it will always use the original jQuery, and pass it on as the $ into the function, so you can still use it in your code.
Best,Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)



