DollarJS matches most CSS Selectors with a few Limitations
$('p.foo') $('p span') $('p > span') $('li:first-child') $('h2[foo="bar"]') $('input:checked') $('#multiple, .multiple')
Wrap the provided elements in DollarJS
$([document.getElementById('foo'), document.getElementById('bar')])
Wrap the window object in DollarJS
$(window)
Wrap the provided node in DollarJS
$(document)
Create new DOM Elements from a string of HTML markup and return a DollarJS instance that contains them
$('<div class="created"><p></p></div>')
Takes a DollarJS instance and uses the selected elements from that instance
$($('p'))
Invoke the provided function as soon as DOM is ready to be accessed (or immediately if this has already happened)
$(function(){ // do stuff })
Matches no elements
$(undefined) $('') $(null) $(false) $(true) $(456) $([1,2,3]) $({ abc: 123 })