I\'ve got a select list like this:
--- Select product ---
To hide it, wrap it with a span tag.
$( "#selectlist option[value=4]" ).wrap( "" );
To show it, unwrap the span tag if it has one.
if ( $( "#selectlist option[value=4]" ).parent().is( "span" ) ){ $( "#selectlist option[value=4]" ).unwrap(); }