Jquery Attribute, content and visibility Filters

Card Set Information

Author:
dalbabes
ID:
161781
Filename:
Jquery Attribute, content and visibility Filters
Updated:
2012-07-09 16:18:27
Tags:
jquery
Folders:

Description:
Covers the basic jquery attribute filters
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user dalbabes on FreezingBlue Flashcards. What would you like to do?


  1. Filter only on objects that have certain attributes such as give me only objects of .classBob that have a href attribute.
    $(".classBob[href]")
  2. filter an attribute with a certain value, such as ones that only have the class .classBob
    [attribute=value] as in [class=classBob]
  3. 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]
  4. Filter an attribute thats property starts with a certain value
    [attribute^=value]
  5. filter an attribute that ends with a certain property
    [attribute$=value]
  6. filter an attribute that CONTAINS a certain value
    [attribute*=value]
  7. 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]
  8. filter for something that has certain text
    :contains(text)
  9. filter for something that contains nothing
    :empty
  10. 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)")
  11. Filters only elements that have child objects
    :parent
  12. filters for elements that are diplayed and ones that aren't
    • displayed :visibile
    • :hidden 

What would you like to do?

Home > Flashcards > Print Preview