I'm using .each iterating through all the options of the select tag and checking the condition If(this.selected)
This doesn't work for to get it done.
I'm using .each iterating through all the options of the select tag and checking the condition If(this.selected)
This doesn't work for to get it done.
$("#select-id option").each(function() {
if($(this).attr('selected')) {
//your code for selected
}
});