jquery class Array

Source: Internet
Author: User

1. What is an array of classes

Multiple DOM objects encapsulated by jquery objects

Class: Refers to a similar

Have their own unique method of operation

2. Operation of class array

Length Property
Each (FN) iterates through an array of classes and FN is used to process DOM objects. In FN, this represents the DOM object that is being traversed. The FN function can add a parameter I to represent the subscript of the DOM object being traversed (starting at 0)
EQ (Index): Takes out the DOM object with subscript equal to index
Get (): Returns an array consisting of a DOM object
Index (OBJ): Returns the subscript of a DOM or jquery object in an array of classes.

<ul>      <li>item1</li>      <li>item2</li>      <li>item3</li>    </ul>    var $obj =$ (' ul Li ');    $obj. Each (function(i) {      if(i==0)        $ (this). CSS (' font-size ', ' 30px ');    });

jquery class Array

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.