[英]jQuery: easeoutbounce not working on mouseout
$(function(){
$('.header').on('mouseover',function(){
$(this).animate({height:"200px"},500,'easeOutBounce');
},
function(){
$('header').on('mouseout',function(){
$(this).animate({height:"10px"},500,'easeOutBounce');
});
});
});
I am trying to animate header that comes out with easeOutBounce
effect and when mouse is out, it goes hidden with 10px
height. 我正在尝试对带有easeOutBounce
效果的标题进行动画easeOutBounce
,当鼠标移出时,它会以10px
高度隐藏。
I am not getting this done, please let me know what went wrong in this? 我还没完成,请告诉我这出了什么问题?
Fiddle for this- Fiddle 提琴为此- 提琴
I am not able to set the height 10px
on next function, i tried with second mouseout function but this didn't work. 我无法在下一个功能上设置高度10px
,我尝试使用第二个mouseout功能,但这不起作用。
$(function () {
$('.header').hover(function () {
$(this).stop().animate({
height: "200px"
}, 500, 'easeOutBounce');
}, function () {
$(this).stop().animate({
height: "10px"
}, 500, 'easeOutBounce');
});
});
Fiddle - http://jsfiddle.net/atif089/bbKyG/3/ 小提琴-http: //jsfiddle.net/atif089/bbKyG/3/
$( "#clickme" ).click(function() {
$( "#book" ).animate({
height: "toggle"
}, {
duration: 2000,
specialEasing: {
height: "easeOutBounce"
},
});
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.