You could use nextUntil() and do like this:
var allOptions = $("#input_13 option"); jQuery('#input_1_34').bind('change', function() { //get selected value from drop down var selectedValue = jQuery("#input_1_34").val(); //hide everything but bases for the selected state //jQuery$("#input_13 option[value=" + selectedValue + "]"'#input_13').nexthtml('').removeappend(allOptions); selectedOptions = $("#input_13 option[value=" + selectedValue + "]").nextUntil('.level-0').andSelf();;; $('#input_13').html('').append(selectedOptions); }); EDIT- i changed the answer to allow the user to choose more options
Look at the fiddle here: http://jsfiddle.net/QGCh4/1/http://jsfiddle.net/QGCh4/2/