javascript - Removing select items depending on selected items -


i have 2 select elements times 12:00 through 11:45 pm,

both selects have same options inside including text , value. possible example select 1:00 pm on first select remove options before 1:00 pm on second select? know can detect change jquery

$('#select1').change(function(){  // in here remove previous selects  }); 

any appreciated it.

try this

$('#select1').change(function(){   var value = $(this).val();  $("#selectid > option").each(function() {    if(value > this.value)       $("#selectid  option[value=this.value]").remove();         });     }); 

but values need in ascending order select boxes


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -