I want to read the value of the select tag which has [] in its id.
<select id="jobtype[]" class="dropDown" size="4" multiple="multiple" name="jobtype[]">
<option value="28">Activity staff/ Resort Rep</option>
<option value="1">Admin/ Secretarial/ Clerical</option>
<option value="2">Advertising/ Marketing/ PR</option>
<option value="29">Art/ Design</option>
<option value="30">Au Pair/ Nanny</option>
I am using the function below for setting 'selected':
$("#jobtype\\[\\] option").each(function()
{
//if ($(this).val() == 39)
{
$(this).attr('selected', 'selected');
}
});
}