Advertisement
Online Test Banks
Score higher
See Online Test Banks
eLearning
Learning anything is easy
Browse Online Courses
Mobile Apps
Learning on the go
Explore Mobile Apps
Dummies Store
Shop for books and more
Start Shopping

jQuery Selectors and Filters

Part of the JavaScript & AJAX For Dummies Cheat Sheet

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/Filter Searches for…
$("element") Any HTML element.
$("#elementID") Any element with the given ID.
$(".className") Any element with the given class name.
:header Any header tag (h1, h2, h3, and so on).
:animated Any element that is currently being animated.
:contains(text) Any element that contains the indicated text.
:empty The element is empty.
:parent An element that contains some other element.
:attribute=value The 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 input tag).
  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus
Advertisement
Advertisement

Inside Dummies.com

Dummies.com Sweepstakes

Win an iPad Mini. Enter to win now!