Reputation: 183
I am trying to select all select boxes but multiple select boxes in document. I tried:
$('select').not('[multiple]').hide();
How can I do this?
Edit:
Definition of a select box:
<select>
<option></option>
</select>
Definition of a multiple select box:
<select multiple>
<option></option>
<option></option>
<option></option>
</select>
Upvotes: 1
Views: 3665
Reputation: 26753
Close:
$('select:not(select[multiple])').hide();
Or:
$('select').not('select[multiple]').hide();
Upvotes: 3