Parsing and usage of is (': visable') in jQuery (mandatory), jqueryvisible

Source: Internet
Author: User

Parsing and usage of is (': visable') in jQuery (mandatory), jqueryvisible

Instance

Select each visible element in the <body> element:

$ ("Body: visible ")

Definition and usage

: The visible selector selects each currently visible element.

Except for the following situations, the elements are visible elements:

• Set to display: none
• Type = "hidden" form Element
• Set Width and height to 0.
• Hidden parent element (hide all child elements at the same time)

Syntax

$ (": Visible ")

$ (Document ). ready (function () {$ ('# faq '). find ('dd '). hide (). end (). find ('dt '). click (function () {// end () is the end of the previous processing function, return to the initial element // explanation: end the hide () of find (dd) with end (), and apply find (dt) to the first # fap var answer =$ (this ). next (); // next () can be added to the next element of this element. next () indicates the next element, and so on if (answer. is (': visable') {// If ANSWER is visible, visible indicates visible, and its usage also includes: hidden (hidden),: first (first ),: last (last) answer. slideUp (); // hide} else {answer. slideDown (); // display }});});

In the above jQuery article, is (': visable') parsing and usage (mandatory) are all the content that I have shared with you. I hope to give you a reference, we also hope that you can support the customer's home.

Related Article

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.