JQuery implements the Method Analysis of the regular hidden dialog box. The jquery dialog box

Source: Internet
Author: User

JQuery implements the Method Analysis of the regular hidden dialog box. The jquery dialog box

This document describes how to implement a regular hidden dialog box using jQuery. We will share this with you for your reference. The details are as follows:

The following content may not be completely correct. It is for reference only when there is a problem.

1. setTimeout

: When a time is set but the program is executed immediately.

: Whether it iswindow.setTimeoutOrwindow.setIntervalWhen using the function name as the call handle, parameters are not allowed.

: The solution is to define an anonymous function.

setTimeout(function(){$j('#pre'+ID).fadeOut()},12000);

: The second parameter is the number of milliseconds, 1 second = 1000 milliseconds

Others: introduction to this URL: http://www.bkjia.com/article/36681.htm

2. Set the dialog box to hide

Common Method 1:

<script language='javascript' type='text/javascript'>$(function () {  setTimeout(function () {    $("divid").show();  }, 6000);})</script>

Common Method 2:

<Script language = 'javascript 'Type = 'text/javascript '> $ (document ). ready (function () {/*** 1. the delay function is a new function in jquery 1.4.2*2. the hide function must be set to 0, otherwise the latency does not work. * 3. delay is executed asynchronously. */$ ('# Divid'). delay (6000). hide (0 );});

Reference URL Introduction: http://www.bkjia.com/article/135028.htm

3. Differences between fadeOut and hide

The hidden effect of hide is to fold down from bottom to bottom or from bottom to top left, while the fade-out effect of fadeOut is fade-out until it disappears (I don't see the difference)

Reference URL Introduction: http://www.bkjia.com/article/90750.htm

Related Article

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.