Home > Web Front-end > JS Tutorial > Three small examples of closing pop-up layers in jquery_jquery

Three small examples of closing pop-up layers in jquery_jquery

WBOY
Release: 2016-05-16 17:17:35
Original
1019 people have browsed it

In developing applications, we make a pop-up layer. Sometimes we make a close button, so that clicking close can close the pop-up layer. However, sometimes we hope that the pop-up layer will be automatically closed as long as we don’t click inside the pop-up layer. Below I summarized three examples.
Example 1

Copy code The code is as follows:

< ;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns="http://www.w3.org/1999/xhtml">

Click on the blank space to close the pop-up window
< meta http-equiv="content-type" content="text/html;charset=gb2312">







Example 2, click somewhere other than itself to close the pop-up layer

Copy the code The code is as follows:






;
show-area




" -//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


jQuery click on the blank space to close the popup layer




Open me, click Blank is closed, thank you

Open popup layer




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