I have a dropdown with a few disabled options. And I want make all options enabled.
This is html:
<select id="selectId">
<option value="JavaScript" disabled="">JavaScript</option>
<option value="Angular">Angular</option>
<option value="Backbone" disabled="">Backbone</option>
</select>
JavaScript:
var select = $("#selectId");
select.find("option").each(function(index, item) {
item.attr('disabled',false);
});
But I get an error: TypeError: item.attr is not a function. What's wrong here?