Animation jquery与animate 我有一个在鼠标上显示div的页面,无论我想让页面移动到焦点上的div…我在这里得到了帮助

Animation jquery与animate 我有一个在鼠标上显示div的页面,无论我想让页面移动到焦点上的div…我在这里得到了帮助,animation,html,slide,mouseenter,jquery-easing,Animation,Html,Slide,Mouseenter,Jquery Easing,现在我想让onfocus和easing插件一起移动到div并移动它。我不想在动画中使用“慢” $('html, body').animate({ scrollTop: $('#box0').offset().top }, 1000); 如何对上述代码应用宽松 其次,我希望显示的div在mouseenter上从左向右滑动,在隐藏之前从右向左滑动。 这就是我现在使用的。我知道有更好或最好的方法来实现我现在正在做的事情 $("#app0").mouseenter(function () { $("

现在我想让onfocus和easing插件一起移动到div并移动它。我不想在动画中使用“慢”

$('html, body').animate({ scrollTop: $('#box0').offset().top }, 1000);
如何对上述代码应用宽松

其次,我希望显示的div在mouseenter上从左向右滑动,在隐藏之前从右向左滑动。 这就是我现在使用的。我知道有更好或最好的方法来实现我现在正在做的事情

$("#app0").mouseenter(function () {
 $("#lSection2").show('slide').delay(3000); //container for div of four 
 $("#boxContent0").slideDown(2000);$('html, body').animate({ scrollTop: $('#app0').offset().top }, 1000);// one of the divs within #lSection2

}); 

$('#boxContent0').mouseleave(function() {
    $("#boxContent0").fadeOut(1000);     
    $("#lSection2").fadeOut(1000);
});

感谢您的帮助

可以按如下方式添加缓解措施,请参见

您可以将鼠标悬停用于
mouseover
mouseout

$("#app0").hover(function () {
     // Mouseover
     $("#lSection2").stop(true, false).width(0).animate({ width: 200}, 1000);
},function(){
     // Mouseout
     $("#lSection2").stop(true, false).width(0).animate({ width: 0}, 1000);
});

需要停止,否则mouseover、mouseout将完成第一个动画,然后是下一个、下一个和下一个,这样您就可以停止动画并继续下一个。

感谢动画链接…但是对于悬停,我尝试了,但没有任何效果…我需要放置.show()吗?
$("#app0").hover(function () {
     // Mouseover
     $("#lSection2").stop(true, false).width(0).animate({ width: 200}, 1000);
},function(){
     // Mouseout
     $("#lSection2").stop(true, false).width(0).animate({ width: 0}, 1000);
});