i have this code:
function DisableDropDownsMonth() {
$(".filterDropdown").val(0);
$(".filterDropdown").attr("disabled", "disabled");
}
to disable a bunch of select dropdowns that all have this class. I have a new requirement to call this on every “.filterDropdown” EXCEPT if the id = “#firstDropdown”
is there any syntax for this in jquery?
You can use the
:not()selector to exclude it, like this:Or possibly judging by your ID,
:gt()like this:This would disable all except the very first
class="filterDropdown"in the DOM.