views:

25

answers:

1

Hello,

I need help concerning following code: http://jsfiddle.net/8PsdE/

<SELECT ID="pizzasize" NAME="pizzasize">
<OPTION VALUE="s">small
<OPTION VALUE="m">medium
<OPTION VALUE="l">large
</SELECT>

    $(function() {
   $('#pizzasize > option[value*="m"]').detach();
});

How can I add the detached option back again? Thx in advance...

A: 

Get a reference to the options you have selected, then you can detach them or do anything else with them using that reference:

$(function() {
  var theOptions = $('#pizzasize > option[value*="m"]');
  theOptions.detach();

  // Do other things with theOptions
});
Oded
thank you... a good starting point for me