Friday, March 27, 2009

[jQuery] Re: Removing Single Option from Select

Hi,

you select your select : 

$('#myselect');

then u find the option with the value -1 : 

$('#myselect').find('option[value=-1]')
or
$('#myselect option[value="-1"]');

finally you removed it
$('#myselect option[value="-1"]').remove();

Pierre

2009/3/27 iceangel89 <iceangel89@gmail.com>

How can i remove a single option (with value -1, if possible) from a
select?

No comments:

Post a Comment