Home > Web Front-end > JS Tutorial > body text

jquery popup close mask layer example_jquery

WBOY
Release: 2016-05-16 17:26:37
Original
1340 people have browsed it

Copy code The code is as follows:




Jquery easily implements the mask layer - Script Home



After displaying the mask layer, click the upper right corner to close

< ;/div>
Script Home

www.jb51.net

keleyi

www.jb51.net

Script Home

Script HomeBack to top
a

jquery


www.jb51.net

Full code






Two jquery methods are used:
1. show(): If the selected elements have been hidden, display these elements

Syntax
$(selector).show(speed,callback)

speed
Optional. Specifies how quickly an element goes from hidden to fully visible. Default is "0".
Possible values:
milliseconds (e.g. 1500)
"slow"
"normal"
"fast"
Set the speed at which an element goes from hidden to fully visible In the process, its height, width, margins, padding and transparency will be gradually changed.

callback
Optional. The function to be executed after the show function is executed.
This parameter cannot be set unless the speed parameter is set.

Tip: If the element is already fully visible, the effect will not change unless a callback function is specified.
Note: This effect applies to elements hidden through jquery, or elements declared with display:none in css (but not elements with visibility:hidden).


2. hide(): If the selected element is already displayed, hide the element.

Syntax
$(selector).hide(speed,callback)

speed
Optional. Specifies how quickly an element goes from visible to hidden. Default is "0".
Possible values:
milliseconds (e.g. 1500)
"slow"
"normal"
"fast"
The process of an element going from visible to hidden if the speed is set , will gradually change its height, width, margins, padding, and transparency.

callback
Optional. The function to be executed after the hide function is executed.

This parameter cannot be set unless the speed parameter is set.

Tip: If the element is already fully visible, the effect will not change unless a callback function is specified.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template