I'm spanish (sorry for my english), and it's the first time that i write here for ask something.
After hours of debugging and searching why the Fancybox script didn't work i search a conflict between two scripts in my website (now in Maintence Mode)
I use a few scripts on my website, but I can safely say that I have a conflict between these two scripts:
http://www.planetdescargas.com/wp-content/themes/bigfoot/javascripts/jquery.mousewheel-3.0.4.pack.js
http://www.planetdescargas.com/wp-content/themes/bigfoot/javascripts/jquery.fancybox-1.3.4.pack.js
AND
http://www.planetdescargas.com/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/global.js?ver=3.0.5
The first two scripts is the plugin for jquery "fancybox", the other is the main javascript (Ajax) for wordpress plugin: BuddyPress.
The latter creates conflict in fancybox. If I remove BuddyPress' script, fancybox works perfectly, but if not, fancybox don't work.
BuddyPress' script, global.js has a variable defined at the outset that is the one that makes the script. I try to define it this way:
var jq = jQuery.noConflict ();
But still not working.
Any suggestions?
In Firebug console i got this:
c.easing[this.options.specialEasing && this.options.specialEasing[this.prop] || a] is not a function
[Detener en este error] e,this.options.orig[e]);this.options.c...++)ab||a.splice(b--,1);a.length||
Line 143 of
http://www.planetdescargas.com/wp-includes/js/jquery/jquery.js?ver=1.4.2
Thanks
Simply use this way.
Open the
wp-content/plugins/buddypress/bp-themes/bp-default/_inc/global.js
Add on top:
Go to line #1264
Add this below:
Similarly you can resolve the jQuery Cookie plugin conflict error.
I don't know what was wrong, but i solved the problem. I use this code in my functions.php in my theme root:
I took the libraries from a wordpress plugin called Easy Fancybox, and now all work fine. Thanks!
That's not how you use
jQuery.noConflict()
.noConflict()
releases control of the$
symbol. From what I see from your other scripts though, they use the safe way ((function($){ }(jQuery))
) so usingnoConflicts()
has no actual effect.Change this
into this:
To make sure.
Documentation: http://api.jquery.com/jQuery.noConflict/