本快速指南演示瞭如何使用jQuery的多個選擇器同時使多個DOM元素動畫。 請記住,jQuery的animate()
函數是異步的,這意味著它可以在多個元素上同時執行。
不正確的語法:("selector1, selector2, selectorN")
正確的語法:
// This will NOT work correctly $('#content', '#sidebar-grab').animate({ /* animation properties */ });
)。 正確使用逗號允許jQuery同時定位和動畫和。
以上是jQuery動畫截然dom元素同時的詳細內容。更多資訊請關注PHP中文網其他相關文章!