The jQuery attribute selectors are used to select
elements from a page based on the attributes of the element. For example the “#”
selector will select elements based on the ID of the elements.
In this post we shall see the various attribute selectors available in jQuery, and how to use them to filter out elements of specific type.
The following are the attribute selectors available in jQuery.
In this post we shall see the various attribute selectors available in jQuery, and how to use them to filter out elements of specific type.
The following are the attribute selectors available in jQuery.
Selector
|
Type
of Element selected
|
#
|
Selects
elements based on the ID of the Element
|
.
|
Selects
elements based on the class of the Element
|
[attribute]
|
Selects
all elements which have the specific attribute
|
[attribute=value]
|
Selects
all elements with the specified attribute and the specified value
|
[attribute!=value]
|
Selects
all elements with the specified attribute and not the specified value
|
[type=value]
[attribute=value]
|
Selects
all elements of the specified type which have the specified value for the
attribute.
|
[type=value]
[attribute!=value]
|
Selects
all elements of the specified type which do not have the specified value for
the attribute.
|
Related Post
jQuery attribute Selectors
jQuery id selector
jQuery class selector
jQuery attribute exists selector
jQuery attribute value selector
jQuery attribute with type selector
jQuery attribute with type and value IN selector
jQuery attribute with type and value NOT IN selector
jQuery attribute with dropdown type selector
jQuery attribute with checkbox type selector
jQuery attribute selector Example
No comments:
Post a Comment