jQuery中animate用法实例分析
本文实例讲述了jQuery中animate用法。分享给大家供大家参考。具体如下:
这是一个简单的animate函数尝试。代码如下:
<script type="text/javascript">
$(document).ready(function(){
$(".side-box h3").toggle(function(){
$(this).addClass("box-arrow");
$(this).next(".side-text").animate({
height: 'toggle',
opacity: 'toggle'
}, "slow");
return false;
},function(){
$(this).next(".side-text").animate({
height: 'toggle',
opacity: 'toggle'
}, "slow");
$(this).removeClass("box-arrow");
return false;
});
});
</script>希望本文所述对大家的jQuery程序设计有所帮助。
相关推荐
钱多多 2013-05-29
89463661 2019-12-04
suis 2019-11-16
LingPF 2019-11-08
王福朋 2018-02-28
CandyGoo 2014-08-19
84483065 2019-03-25
limengmeng00 2018-08-22
CrazyDogWang 2017-02-14
无情 2015-06-25
liusure0 2015-06-11
zyhui 2015-06-10
富贵 2015-01-16
zhangmingming 2013-05-29
XiaoSpring 2011-01-24
Haoroid 2018-01-16
natineprince 2017-03-15
87244857 2019-05-08
natineprince 2016-07-13