JQuery fadeout Asynchronous Instance code detailed _jquery

Source: Internet
Author: User

Definitions and usage

The fadeout () method gradually changes the opacity of the selected element, from visible to hidden (fading effect).

Note: Hidden elements are not fully displayed (no longer affect the layout of the page).

Tip: This method is usually used in conjunction with the FadeIn () method.

Grammar

$ (selector). fadeout (Speed,easing,callback)

1. Overview

The function of jquery to animate is easy to use, but animation execution is asynchronous, so put the custom action in the callback function.

2. Example

 
 

3. Something

In the example above, the callback function can be replaced with the arrow function,

<script type= "Text/javascript" >
$ (function () {
' use strict ';
(function () {
var tr = $ ("#test-table>tbody>tr:visible").
Tr.fadeout (' 4000 ', () =>tr.remove ());
}) ();
});
</script>

The above is a small set to introduce the jquery fadeout asynchronous example code to explain, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.