The jQuery syntax syntax is the same as the css syntax. Thus, ".menu" will select everything with a menu class, "#menu" will select an object with a menu identifier (there should be only one menu, "" will try to select menu items of types.
Example:
<div class="foo" id="d1">Div 1</div> <div class="foo" id="d2">Div 2</div> <span class="foo" id="s1">Span 1</span> <span class="foo" id="s2">Span 2</span> $(".foo").css("background", "red");
lynks source share