how do I change the code below so that multiple elements with ids can be returned (actions to happen to more elements than just the one with id=”firstId”). Thanks in advance.
$("#main").change(function() {
var first = $(this);
$('#occupation').prop("disabled", function() {
return first.children(":selected").attr("id") === ("firstId");
});
});
1 Answer