How should I understand
$("select option:selected")
in the following code ?
(taken from here)
$("select").change(function() {
...
$("select option:selected").each(function () {
...
});
...
})
Is it all selected options in all selects in the document ?
Is it somehow related to the current select, $(this) ?
Yes, it will refer to all selected options in all selects. If you just want to look at the current select, you can do something like this: