Home >Web Front-end >JS Tutorial >jquery queue function usage example_jquery

jquery queue function usage example_jquery

WBOY
WBOYOriginal
2016-05-16 16:26:271327browse

The examples in this article describe the usage of jquery queue function. Share it with everyone for your reference. The specific implementation method is as follows:

Copy code The code is as follows:








Click here...

<script><br> $(document.body).click(function () {<br> ​​​ $("div").show("slow");<br> //$("div").slideDown();<br> ​​​ $("div").animate({left:' =200'},2000);<br> ​​​ $("div").queue(function () {//Queue<br>              $(this).addClass("newcolor");<br>               $(this).dequeue();//Dequeue<br> });<br> ​​​ $("div").animate({left:'-=200'},2000);<br> ​​​ $("div").queue(function () {//Queue<br>              $(this).removeClass("newcolor");<br>               $(this).dequeue();//Dequeue<br> });<br> $("div").slideUp();<br> });<br> </script>

I hope this article will be helpful to everyone’s learning of jQuery programming.

Statement:
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