JQuery-01. jquery features, how to use jquery, jquery entry functions, the difference between jquery and Dom objects, jquery selectors,

Source: Internet
Author: User

This refers to the native JS Dom object

. CSS (""): Write only one value is value, write two values is assignment

Window.onload = = = $ (document). Ready ();

$ (""): Gets the element tag name,. Class name, #id

JQuery     features

  1. Chained programming
      1. Jq.shou (in). HTML (content)
          1. Equivalent
            1. Jq.shou (3000)
            2. jq.gtml (content)
  2. Implicit iteration
      1. Implicit practical for loop, iteration

        How to use jQuery
  3. Primer Package
      1. Be sure to use it before
      2. <script src = ' ><>
  4. Entry function
      1. $ (document). Ready (function ({}))
  5. Binding time between
      1. Event source. event (function () {event-driven function})

        jQuery Entry function
  6. The function is executed when the document is loaded and the picture is not loaded
      1. $ (document). Ready (function ({}))
      2. $ (function () {})
  7. Both the document and the picture are loaded to execute the function
      1. $ (window). Reday (function () {})
  8. JS entry can only be once, multiple times will overwrite
  9. Jqery can have multiple entry functions
  10. $ = = = JQuery

    The difference between jQuery and DOM objects
  11. The jquery object is an array that contains the native Jsdom object
  12. Native JS object is a native object
  13. jQuery Object Name = $(JS object name)
  14. JS object converted to jQuery object
      1. jquery object name [index value]
      2. jquery object name. Get (WWM index value)
  15. Different objects have different methods
  16. The JQuery object method contains native JS object methods.
  17. jquery object. The return value of length is the number of elements
    jQuery Selector
  18. Basic: #id,. class, tag name,
      1. * Wildcard Selector
  19. Hierarchy Selector
      1. Descendant selector >
      2. Descendant selector Spaces separated
      3. Basic Filter Selector
          1. : eq (index) iterates through an array of elements
          2. : Odd gets the elements of an even-digit index
          3. : Even an element that obtains an odd-digit index value
  20. Filter selectors
    1. Find (Selector): Finds all child elements of the parent element
          1. Parent element . Find(' child element to find ')
          2. Find all descendants child elements
        1. Children: Pro-son
          1. The parent element . Children(' child element to find ')
          2. Find only child elements
    2. : EQ (Index)
    3. Next (); Next sibling node
    4. Parent (): Gets the parent element of the element
    5. Siblings: All sibling nodes (not including itself)


      <! DOCTYPE html>;} UL {List-style-Type:none;}            . parentwrap {width:200px; Text-Align:center; }. Menugroup {border:1px solid #999; Background-color: #e0ecff;            }. grouptitle {display:block;            height:20px; Line-height:20px; Font-size:16px; Border-bottom:1px solid #ccc;        Cursor:pointer; }. Menugroup>Div {height:200px; Background-color: #fff;        Display:none; }    </style> <script src= "Jquery-1.11.1.min.js" ></script> <script>        $(function () {            //need: Mouse click on span, let him below the Div show out. Let the other div hide. $ (". Parentwrap span"). Click (function () {//$ (this). Next (). Show ();////Let the other hide////Click on the span of the Father Li, all of the brother elements of Li, the child element div all hidden. //$ (this). Parent ("Li"). Siblings ("Li"). Children ("div"). Hide ();                //Connected Programming$( This). Next (). Show (). Parent ("Li"). Siblings ("Li"). Find ("div"). Hide ();        }); })    </script>Accordion Case

JQuery-01. jquery features, how to use jquery, the jquery entry function, the difference between jquery and Dom objects, the jquery selector,

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.