Hi I have a multiselect box that is a checkbox, here is my attempt to add the value to the existing selected values, remove the value from the exisiting selected values and set which overwrites all the selected values with the ones chosen. Im not getting results from these attempts and would appreciate a little guidance. thank you
$('.add_button').click(function() {
selected=$(this).val();
id=$(this).attr('id');
$('#opdots-bach-edit', 'option:selected', this).add();
});
$('.remove_button').click(function() {
selected=$(this).val();
id=$(this).attr('id');
$('#opdots-bach-edit','option:selected', this).remove();
});
$('.set_button').click(function() {
selected=$(this).val();
id=$(this).attr('id');
$('#opdots-bach-edit select.'+id).val(selected);
});
<input type="checkbox" name="employeeid[]" value="1870">
<input type="checkbox" name="employeeid[]" value="1874">
etc etc.
then here are my div buttons
echo '<div class="add_button" value="ssremployeeid[]">add</div>';
echo '<div class="remove_button" value="ssremployeeid[]">remove</div>';
echo '<div class="set_button" value="ssremployeeid[]">set</div>';