0
回調函數:如何在動畫完成前使用回調函數?使用
$('.caption').animate({'bottom':'0px'}, function(){$('.caption').text(data);});
// animates and change caption from image1 to image2
使用回調函數動畫
$('.caption').text(data);
$('.caption').animate({'bottom':'0px'});
//first change caption from image1 to image2 and animates
之前,但我想標題從imag1改變動畫期間鏡像2。
可以使用'start'屬性來執行功能,一旦動畫開始,或者你可以設置超時在特定時間在動畫開始後發生。 – Nunners