How to get all "option" values in "select" by Jquery?
The following will give you an array of the <option>
values
var values = $.map($('#group_select option'), function(e) { return e.value; });// as a comma separated stringvalues.join(',');
Here's a Working Demo. add /edit to the URL to see the code.
This will iterate through all the options and give you their values.Then you can either append them to an array or manipulate them individually.
$('#group_select option').each(function(){ $(this).val()};