How can I transform the following jQuery code to working JavaScript code?
jQuery
$('select :visible:selected').each(function(i) {
// instructions
}
The visible selector I’ve already implemented with JS. Or is there a better solution?
JavaScript
for (var i=0;i<$('select').length;i++) {
if ($('select')[i].style.visibility == "visible") {
// instructions
}
}
Thanks for your help!
Selected takes selected OPTION from SELECT list. So to get all selected options from all visible SELECTs from the page with pure JavaScript
UPDATE So if I undestand you corectly you need all selected OPTIONS from ALL visible SELECTs and you CAN use jQuery