I am new to jQuery and I want to enable and disable a dropdown list using a checkbox. This is my html:
A better solution without if-else:
$(document).ready(function() { $("#chkdwn2").click(function() { $("#dropdown").prop("disabled", this.checked); }); });