jquery lavalamp and autoscroll easing problem (conflict)
I have got a problem and am really hoping you guys can help.
http://ontwikkelomgeving.wijzijnblits.nl/primawonen/ Here you can find a website that i am currently creating.
As you can see the autoscroll works (called het laatste aanbod). This uses the easing.min.js plugin. At th开发者_StackOverflowe navigation i use lavalamp, however this does not work right now.
The problem lies in the easing plugin. If i use an older version of this plugin, lavalamp works. Great you would think, but then the autoscroll script does not work. How can i make it so that both will work?!
I am seriously stuck on this one, and hope that you guys can help me.
thnx in advance
I was having the same problem and I just figured out a way to make it work, add the following lines above everything else in lavalamp.js
jQuery.extend( jQuery.easing,
{
bouncein: function(x, t, b, c, d) {
return c - jQuery.easing["bounceout"](x, d - t, 0, c, d) + b;
},
backout: function(x, t, b, c, d) {
var s = 1.70158;
return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
}
});
And remove the easing plugin. It worked for me.
I had the same problem with two conflicting jquery libraries and found this http://docs.jquery.com/Using_jQuery_with_Other_Libraries
This method worked for me - the order of the scripts is important:
<script src="secondary-jquery-script.js"></script>
<script src="jquery-original-script.js"></script>
<script>
var $j = jQuery.noConflict();
// Here comes the part that needs jquery-Original-script.js - jQuery via $j(...)
$j(document).ready(function(){
$j("div").hide();
});
// and here comes the part that needs the secondary script
$('someid').hide();
</script>
精彩评论