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(); $('#input_13').html('').append(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/2/