Introduction to jquery selector and jquery Selector

Source: Internet
Author: User

Introduction to jquery selector and jquery Selector

First, let's talk about the advantages of the jquery selector:

1. Simple Writing 2. Support for css1.0 to 3.0 selector 3. Complete processing mechanism.

Let's talk about classification:

Jquery selectors include basic selectors, hierarchical selectors, attribute selectors, basic filter selectors, and visibility filter selectors.

 

The basic selectors include: Tag selector, class selector, ID selector, Union selector, intersection selector, and global selector.

There are two common options: class selector and ID selector.

The class selector can directly write the specified tag name. For example, $ ("h2" ).css ("background", "red") sets all h2 elements to red.

The ID selector matches elements based on the given ID. For example, $ (". title" ).css ("background", "green") indicates that the element whose id is set to title is green.

 

Hierarchical selectors include child selector, child selector, adjacent element selector, and peer element selector.

There are two common types: descendant selector and child selector.

The descendant selector is the element of an element descendant. For example, h1 em {color: red;} indicates that the em element in h1 is set to red.

A word selector is a child element of an element. For example, h1> strong {color: blue;} indicates that the strong element in h1 is set to blue.

 

The rest will not be detailed. If you want to know more, you can check the information.

I hope that I will step on the java learning path. -- Mr. chic

 

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.