jQuery หยุด ()เมธอด
ตัวอย่าง
หยุดแอนิเมชั่นที่กำลังทำงานอยู่:
$("#stop").click(function(){
$("div").stop();
});
ความหมายและการใช้งาน
เมธอด stop() จะหยุดแอนิเมชันที่ทำงานอยู่ในปัจจุบันสำหรับองค์ประกอบที่เลือก
ไวยากรณ์
$(selector).stop(stopAll,goToEnd)
Parameter | Description |
---|---|
stopAll | Optional. A Boolean value specifying whether or not to stop the queued animations as well. Default is false |
goToEnd | Optional. A Boolean value specifying whether or not to complete all animations immediately. Default is false |
ลองด้วยตัวคุณเอง - ตัวอย่าง
วิธีหยุดภาพเคลื่อนไหวที่เข้าคิว
วิธีการทำแอนิเมชั่นทั้งหมดให้เสร็จทันที