1
我有一個#parent包含隱藏的#child。當我將鼠標懸停在#parent上時,我想要fadeIn()這個孩子。這樣可行。有動畫的孩子之前動畫父親
$(document).on("mouseenter", "#parent", function() {
$(this).find("#child").fadeIn();
});
$(document).on("mouseleave", "#parent", function() {
$(this).find("#child").fadeOut();
});
現在,在#child淡入之前,我該如何首先將#parent設置爲正確尺寸的動畫?
我創建了一個fiddle來展示我的意思。 現在,當#child淡入時#parent剛剛「彈出」。
任何幫助?
好吧,這工作,但我想,如果有一種方法不給靜態的高度值,但「實際」 endheight。 –
@OathComrade嘗試新的更新。 –
@RajaprabhuAravindasamy還有一個修復需要,當我連續移動光標時,它必須在製作新動畫之前停止或合併最後一個。 – Adrian