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.setTimeout
Orwindow.setInterval
When 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