Home
Flashcards
Preview
Jquery Attribute, content and visibility Filters
Home
Get App
Take Quiz
Create
Filter only on objects that have certain attributes such as give me only objects of .classBob that have a href attribute.
$(".classBob[href]")
filter an attribute with a certain value, such as ones that only have the class .classBob
[attribute=value] as in [class=classBob]
Attribute filter that selects objects with that attribute but without the property given. as in give me everything with a class that is not .classBob
[attribute!=value] as in [class!=classBob]
Filter an attribute thats property starts with a certain value
[attribute^=value]
filter an attribute that ends with a certain property
[attribute$=value]
filter an attribute that CONTAINS a certain value
[attribute*=value]
If you want two types of attribute filters what would you use? for instance, you want something that has a class attribute and an href attribute
[filter1][filter2] as in [class][attribute]
filter for something that has certain text
:contains(text)
filter for something that contains nothing
:empty
Filter for something that contains a certain sub element. Such as find me all the divs that have p's in them
:has(object) as in $("div:has(p)")
Filters only elements that have child objects
:parent
filters for elements that are diplayed and ones that aren't
displayed :visibile
:hiddenÂ
Author
dalbabes
ID
161781
Card Set
Jquery Attribute, content and visibility Filters
Description
Covers the basic jquery attribute filters
Updated
2012-07-09T20:18:27Z
Show Answers
Home
Flashcards
Preview