selector union
selector union
What is the best way to get the union of two selectors? For example, say I want all the elements that have the class "foo" and all the elements that have the class "bar". I found this:
$('.foo').add('.bar')
Is that the only way?