jquery插件之easing使用
更新時(shí)間:2010年08月19日 15:19:07 作者:
很簡(jiǎn)單的一個(gè)效果插件,但不是經(jīng)常用,怕忘了,以后在用又要去看文檔,所以現(xiàn)在把筆記寫(xiě)下來(lái),方便以后
復(fù)制代碼 代碼如下:
<script>
$(function(){
$.easing.def="easeInQuad";//設(shè)置默認(rèn)效果
var callback=function (){
alert("ok");
}
$("#t1").animate({
"top":600
},{duration: 3000,
easing:"easeInQuad",//可省略
complete: callback})
})
</script>
使用了easing后,JQ原來(lái)的方法有將不可用,用對(duì)象代替JQ中時(shí)間,該對(duì)象如下例
{duration: 3000,easing:"easeInQuad",complete: callback}
原JQ的回調(diào)函數(shù)由complete代替
如果不使用easing,即時(shí)間參數(shù)不為上面對(duì)象所代替,保留原有功能
即加載EASING后仍可以如下使用
復(fù)制代碼 代碼如下:
<script>
var callback=function (){
alert("ok");
}
$("#t1").hide(3000,callback)
</script>
具體參數(shù)細(xì)節(jié):
duration 選項(xiàng):
毫秒數(shù)
complete 選項(xiàng):
完成后調(diào)用
easing 選項(xiàng):
jswing
def
easeInQuad
easeOutQuad
easeInOutQuad
easeInCubic
easeOutCubic
easeInOutCubic
easeInQuart
easeOutQuart
easeInOutQuart
easeInQuint
easeOutQuint
easeInOutQuint
easeInSine
easeOutSine
easeInOutSine
easeInExpo
easeOutExpo
easeInOutExpo
easeInCirc
easeOutCirc
easeInOutCirc
easeInElastic
easeOutElastic
easeInOutElastic
easeInBack
easeOutBack
easeInOutBack
easeInBounce
easeOutBounce
easeInOutBounce
官方網(wǎng)站 http://gsgd.co.uk/sandbox/jquery/easing/
您可能感興趣的文章:
- JQuery動(dòng)畫(huà)animate的stop方法使用詳解
- 使用jquery animate創(chuàng)建平滑滾動(dòng)效果(可以是到頂部、到底部或指定地方)
- jQuery中animate()方法用法實(shí)例
- jquery中animate的stop()方法作用實(shí)例分析
- jquery使用animate方法實(shí)現(xiàn)控制元素移動(dòng)
- js實(shí)現(xiàn)類似jquery里animate動(dòng)畫(huà)效果的方法
- jQuery的animate函數(shù)實(shí)現(xiàn)圖文切換動(dòng)畫(huà)效果
- jQuery animate easing使用方法圖文詳解
相關(guān)文章
基于JQuery及AJAX實(shí)現(xiàn)名人名言隨機(jī)生成器
這篇文章主要為大家詳細(xì)介紹了基于JQuery及AJAX實(shí)現(xiàn)名人名言隨機(jī)生成器,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-02-02
jQuery模擬下拉框選擇對(duì)應(yīng)菜單的內(nèi)容
這篇文章主要介紹了jQuery模擬下拉框選擇對(duì)應(yīng)菜單的內(nèi)容,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下2017-03-03
jQuery實(shí)現(xiàn)的簡(jiǎn)單排序功能示例【冒泡排序】
這篇文章主要介紹了jQuery實(shí)現(xiàn)的簡(jiǎn)單排序功能,結(jié)合實(shí)例形式分析了冒泡排序的原理及具體實(shí)現(xiàn)技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下2017-01-01
jQuery使用zTree插件實(shí)現(xiàn)樹(shù)形菜單和異步加載
這篇文章主要介紹了jQuery使用zTree插件實(shí)現(xiàn)樹(shù)形菜單和異步加載的相關(guān)方法,感興趣的小伙伴們可以參考一下2016-02-02

