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

Cloud Intelligence Leading the Digital Future

Alibaba Cloud ACtivate Online Conference, Nov. 20th & 21st, 2019 (UTC+08)

Register Now >

11.11 Big Sale for Cloud

Get Unbeatable Offers with up to 90% Off,Oct.24-Nov.13 (UTC+8)

Get It Now >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.