jQuery Selectors and Filters

Part of jQuery’s power is based on its ability to select particular sections of the page. This table includes several commonly used selectors and filters.















































Selector/FilterSearches for…
$("element")Any HTML element.
$("#elementID")Any element with the given ID.
$(".className")Any element with the given class name.
:headerAny header tag (h1, h2, h3, and so on).
:animatedAny element that is currently being animated.
:contains(text)Any element that contains the indicated text.
:emptyThe element is empty.
:parentAn element that contains some other element.
:attribute=valueThe element has an attribute with the specified value.
:Input, :text, :radio, :image, :button,
etc
Matches on the specific element type (especially useful for
form elements that are all variations of the class="code">input tag).








dummies

Source:http://www.dummies.com/how-to/content/jquery-selectors-and-filters.html

No comments:

Post a Comment