jQuery中animate用法實例分析
更新時間:2015年03月09日 10:07:52 作者:瘋狂的流浪
這篇文章主要介紹了jQuery中animate用法,實例分析了animate的使用技巧,具有一定參考借鑒價值,需要的朋友可以參考下
本文實例講述了jQuery中animate用法。分享給大家供大家參考。具體如下:
這是一個簡單的animate函數(shù)嘗試。代碼如下:
<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程序設計有所幫助。
您可能感興趣的文章:
- jQuery animate和CSS3相結(jié)合實現(xiàn)緩動追逐效果附源碼下載
- jQuery使用animate創(chuàng)建動畫用法實例
- jQuery插件animateSlide制作多點滑動幻燈片
- jQuery中animate動畫第二次點擊事件沒反應
- jQuery的animate函數(shù)實現(xiàn)圖文切換動畫效果
- jquery使用animate方法實現(xiàn)控制元素移動
- jquery中animate的stop()方法作用實例分析
- jQuery的animate函數(shù)學習記錄
- JQuery動畫animate的stop方法使用詳解
- 深入理解jquery自定義動畫animate()
相關文章
jQuery中filter()和find()的區(qū)別深入了解
一直不是很清楚filter()方法和find()方法的區(qū)別,看jQuery Cookbook一書后,終于算是搞清楚了,下面將新的與大家分享下2013-09-09
jQuery實現(xiàn)動態(tài)添加tr到table的方法
這篇文章主要介紹了jQuery實現(xiàn)動態(tài)添加tr到table的方法,涉及jQuery針對table表格元素的動態(tài)操作相關技巧,需要的朋友可以參考下2016-12-12

