i trying change select boxes in order based on selected. have working first 1 change not third. if can me make third 1 work great.
here js using:
$("#cat_custom_496270").change(function() { if($(this).data('options') == undefined){ $(this).data('options',$('#cat_custom_495029 option').clone()); } var id = $(this).val(); var options = $(this).data('options').filter('[value*=' + id + ']'); $('#cat_custom_495029').html(options); }); $("#cat_custom_495029").change(function() { if($(this).data('options') == undefined){ $(this).data('options',$('#cat_custom_495038 option').clone()); } var id = $(this).val(); var options = $(this).data('options').filter('[value*=' + id + ']'); $('#cat_custom_495038').html(options); });
wrap value attribute
filter's value in quotes, since there space in values.
var options = $(this).data('options').filter('[value*="' + id + '"]');
Comments
Post a Comment