Я написал свой собственный маленький код jQuery для эффекта падения, он работал отлично. Но когда я добавил слайдер революции на страницу, эффект падения перестал работать правильно.
< /code>
$( ".effect" ).hover(
function() {
$(".first", this).finish();
$(".second", this).finish();
if ( $( "img", this).length ) {
$width = $('img', this).width() + 'px';
$height = $('img', this).height() + 'px';
}
if ( $( "svg", this).length ) {
$width = $('svg', this).width() + 'px';
$height = $('svg', this).height() + 'px';
}
$( ".first", this ).css({"left" : $width, "top" : $height});
$( ".second", this ).css({"left" : "-" + $width, "top" : "-" + $height});
$( ".first", this ).css({"opacity" : "1"});
$( ".second", this ).css({"opacity" : "1"});
$( ".first", this ).filter(':not(:animated)').animate({
top: "-0",
left: "-0"
}, 200, function() {
// Animation complete.
});
$( ".second", this ).filter(':not(:animated)').animate({
top: "+0",
left: "+0"
}, 200, function() {
// Animation complete.
});
},
function() {
$( ".first", this ).animate({
top: "+" + $height,
left: "+" + $width
}, 200, function() {
$( ".first", this ).css({"opacity" : "0"});
});
$( ".second", this ).animate({
top: "-" + $height,
left: "-" + $width
}, 200, function() {
$( ".second", this ).css({"opacity" : "0"});
});
$width = undefined;
$height = undefined;
});
< /code>
Я пытался исправить его с помощью № conflict () < /code>, но пока не повезло.>
Подробнее здесь: https://stackoverflow.com/questions/337 ... ion-slider