Reputation: 6961
I need to style all the multiple select boxes of a page without using classes, but I don't want the styles to be applied to the combos in the same page. How do I call ONLY the multiple select?
HTML:
Apply styles to:
<select multiple> <option>option 1</option> <option>option 2</option> </select>
But not:
<select> <option>option 1</option> <option>option 2</option> </select>
I'm looking for something like input[type=text]
but for the multiple. Thanks!
Upvotes: 0
Views: 4559
Reputation: 49198
Use the attribute selector:
select[multiple]
As in:
$('select[multiple]').addClass('selected');
Upvotes: 2