javascript - how to get the values from add remove selection box -
javascript - how to get the values from add remove selection box -
i have 2 multiple selection box caste , sub-caste. add together / remove button used in both selection box. want filter sub-caste based on caste. how can value of caste selection box. i'm using code add together / remove is
$('#btn-add').click(function(){ $('#caste option:selected').each( function() { $('#caste_new').append("<option value='"+$(this).val()+"'>"+$(this).text()+"</option>"); $(this).remove(); }); }); $('#btn-remove').click(function(){ $('#caste_new option:selected').each( function() { $('#caste').append("<option value='"+$(this).val()+"'>"+$(this).text()+"</option>"); $(this).remove(); }); });
and using ajax fetch values database. please help. in advance.
$("#caste :input");
should select inputs have been appended. after need go on list , fetch value
javascript jquery
Comments
Post a Comment