jQuery Selector Test Bed

Type a jQuery selector in the field below to see what elements jQuery selects:

jQuery code: $('  ')

Elements found:

Sample Selectors (click to try)

  • *
  • body
  • p
  • .example
  • .main
  • .main h2
  • div>h2
  • h1+div
  • :text
  • #selectorList
  • p:first
  • .col2
  • p:even
  • p:odd
  • p:lt(3)
  • li:contains(.main)
  • p:has(strong)
  • a[href="#"]
  • a[href*="oreilly.com"]
  • a[href^="http://sawmac"]
  • :checked
  • :disabled

More HTML to Select

Heading 3

Quis nostrud exercitation ut labore et dolore magna aliqua. Sed do eiusmod tempor incididunt cupidatat non

Heading 3

Quis nostrud exercitation ut labore et dolore magna aliqua. Sed do eiusmod tempor incididunt cupidatat non

Form Fields


  • Bulleted List Item 1
  • Bulleted List Item 2

+

Test Beds

jQuery Resources