IT. Expert System.

JQUERY

Selectors


Selectors

jQuery selectors allow you to select and manipulate HTML elements as a group or as a single element.

jQuery selectors allow selection of HTML elements (or groups of elements) by element name, attribute name or by content.

jQuery uses a combination of XPath and CSS selector syntax.

Element Selectors

To select HTML elements, jQuery uses CSS selectors. Here are some examples:

Example 1: Select all <p> elements:

$("p")

Example 2: Select all <p> elements with class="intro":

$("p.intro")

Example 3: Select the first <p> element with id="demo":

$("p#demo")

Attribute Selectors

To select elements with given attributes, jQuery uses XPath expressions. Here are some examples:

Example 1: Select all elements with an href attribute:

$("[href]")

Example 2: Select all elements with an href value equal to "#":

$("[href='#']")

Example 3: Select all elements with an href attribute NOT equal to "#":

$("[href!='#']")

Example 4: Select all elements with an href attribute that ends with ".jpg":

$("[href$='.jpg']")

CSS Selectors

jQuery CSS selectors can be used to change the CSS properties of HTML elements. The following example changes the background-color of all p elements to yellow:

$("p").css("background-color", "yellow");


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 233 / 158859281. Delta: 0.00143 с