trying to hide options from selectlist .. not working on chrom and ie

Posted by ninja on Stack Overflow See other posts from Stack Overflow or by ninja
Published on 2010-05-19T13:18:51Z Indexed on 2010/05/19 13:20 UTC
Read the original article Hit count: 96

Filed under:

Hi, I have a select lists, which has lots of option. Depending on some input I want to hide few options from select list. To hide options from select list I have written jquery like

$('#selectlist1 option').each(function(){

$(this).hide();

})

But this code seems to work only for firefox and its not working on chrom and ie. Whereas if I write $('#selectlist1').hide();

it works for all browser. Any pointer where should I look at?

© Stack Overflow or respective owner

Related posts about jQuery