I have the following HTML:
<select id="MySelector" multiple="multiple">
<option value="2">Option A</option>
<option value="7">Option B</option>
<option value="9">Option C</option>
<option value="12">Option D</option>
</select>
<div id="CheckSelected">click here to select</div>
I'm looking to loop through the options of the select and determine which ones have been selected.
I'm looking to do something like this:
ArrayOfSelected = [];
$('#CheckSelected').click(function {
"if option is selected then add value to the array"
});
Thanks for your suggestions.