Reputation: 13
I want to remove empty select menu tags from my html page.
<select name="test"></select> --- remove
<select name="test"> <option value="test">test</option> </select> --- do not remove
Thanks
Upvotes: 0
Views: 48
Reputation: 11018
Preferably suppress the empty SELECT in server-side code. But if you insist on using client-side techniques:
$('select:empty').remove();
Upvotes: 1