I have a very simple form which I would like to hide select options when another select field refines it.
Currently I have tried dispay: none
as an inline s
In the end I used jquery clone, which seemed to do the trick.
http://jsfiddle.net/3vPgY/10/
var everything = $('#everything').clone(true);
$('#refine').change(function () {
var selectColour = $('option:selected', this).val().replace(/ /g, "-");
if (refine != 0) {
var everythingRefined = everything.clone(true).find('.default,.'+selectColour);
$('#everything').removeAttr('disabled');
$('#everything').empty().append(everythingRefined);
} else {
$('#everything').attr('disabled', 'disabled');
}
});