Home > Web Front-end > JS Tutorial > body text

About how to use jQuery stop()

jacklove
Release: 2018-05-04 14:46:55
Original
1754 people have browsed it

jQuery stop() is widely used in animations, and now it will be introduced in detail.

jQuery The stop() method is used to stop animations or effects before they are completed.

#The stop() method works with all jQuery effects Functions, including slides, fades, and custom animations.

Syntax

$(selector).stop(stopAll,goToEnd);
Copy after login

The optional stopAll parameter specifies whether the animation queue should be cleared. The default is false, which only stops active animations, allowing any queued animations to execute backwards.

The optional goToEnd parameter specifies whether to complete the current animation immediately. The default is false.

So, by default, stop() will clear the current animation specified on the selected element.

The following example demonstrates the stop() method without parameters:

Example

$("#stop").click(function(){  
$("#panel").stop();
 });
Copy after login

This article introduces jQuery stop() in detail. If you want to learn more For relevant knowledge, please pay attention to the php Chinese website.

Related recommendations:

jQuery.ajaxStop() function detailed explanation

jQuery uses ajaxStart() and ajaxStop() methods

Detailed explanation of usage examples of stop() in jquery

The above is the detailed content of About how to use jQuery stop(). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!