jquery Click Blank to close the popup layer

Source: Internet
Author: User

Add the Click event to the chest and the toggle pop-up layer is displayed and hidden, and the pop-up layer is displayed so that it can be turned off anywhere.

Here the one () instruction is used to bind a single operation to the body, and the jquery code is as follows:

$ (' #info li:eq (0) '). Click (function () {    $ (' #iphone '). Toggle ();    $ (' body '). One (' click ', Function () {        $ (' #iphone '). Hide ();    })    return false;})

In fact, the place should be to click on the non-self-whitespace (the popup layer itself) to close the popup layer. The solution has not been found, temporarily suspended.

jquery Click Blank to close the popup layer

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.