Jquery Attribute, content and visibility Filters

  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 
Author
dalbabes
ID
161781
Card Set
Jquery Attribute, content and visibility Filters
Description
Covers the basic jquery attribute filters
Updated