 <p>There are several syntax errors in your code try the following code,</p> <pre><code>$(function() { $("#toggleSelect").on("change", function() { idToggler = $(this).attr("rel"); if ($("#" + idToggler).is(":disabled")) { $("#" + idToggler).prop("disabled", false); } else { $("#" + idToggler).prop("disabled", true); } }); }); </code></pre> <p><a href="http://jsfiddle.net/pranavcbalan/Tc56X/" rel="nofollow"><strong><em>Fiddle Demo</em></strong></a></p>