A summary of some common methods of JQuery

Source: Internet
Author: User

$ (' #id '). Siblings ()   the current element for all sibling nodes $ (' #id '). Prev () The       current element before a sibling node $ (' #id '). Prevaall ()   the current element precedes all sibling nodes $ (' #id '). Next () The       current element after the first sibling node $ (' #id '). Nextall ()    all sibling nodes after the current element

  $ (' #id '). Parent (expr)//Find parent Element
  $ (' #id '). Parents (expr)//finds all ancestor elements, not limited to parent elements
  $ (' #id '). Children (expr)//Find all child elements and will only find the immediate child node and will not return all descendants
  $ (' #id '). Contents ()//Find everything below, including nodes and text.
  $ (' #id '). Prev ()//Find the previous sibling node, not all sibling nodes
  $ (' #id '). Prevall ()//Find all previous sibling nodes
  $ (' #id '). Next ()//Find the next sibling node, not all sibling nodes
  $ (' #id '). Nextall ()//Find all subsequent sibling nodes
  $ (' #id '). Siblings ()//Find sibling nodes, no front and back
  $ (' #id '). Find (expr)//Unlike jquery.filter (expr), jquery.filter (expr) is a partial filter from the initial collection of
  JQuery objects. The return result of Jquery.find () will not have the initial set
        filter out part, and Jquery.find () will not have the contents of the initial collection, such as:
  $ (" P "). FIND (" span ") is found starting from the element, equal to $ (" p span ")

// The picker gets the element under which an element traverses $ ("#queryTableDilog table"). each (function () {}); // finds all specified elements under an element collection of $ ( This
// The radio box gets the selected item $ ("Input[name= ' 1isopen ']:checked"). Val ();
// Ajax $.ajax ({            ' POST ',            "login.htm",            data: {                dbName: $ ("#"). Val ()            } ,            DataType:"JSON",            success:function (data) {            },            error:function (Request, Textstatus) {            }});

A summary of some common methods of JQuery

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.