Enable/Disable Textbox in jquery
<p>I want to enable text box when first radio button is checked &amp; if second then  i want to disable textbox here is my code that is not working please help..</p>

<pre><code>&lt;label class="radio-inline"&gt;
    &lt;input type="radio" value="Y" name="IsLive" class="grey"&gt;
    YES
&lt;/label&gt;
&lt;label class="radio-inline"&gt;
    &lt;input type="radio" value="N" name="IsLive" class="grey"&gt;
    NO
&lt;/label&gt;

&lt;label class="col-sm-2 control-label"&gt;
    Live Date
&lt;/label&gt;
&lt;div class="col-sm-3"&gt;
    &lt;input type="text" id="LiveDate" name="LiveDate" class="form-control date-picker"&gt;
&lt;/div&gt;
</code></pre>

<pre class="lang-js prettyprint-override"><code>$('input:radio[name="IsLive"]').change(function () {
    if ($(this).is(':checked') &amp;&amp; $(this).val() == 'Y') {
        // append goes here
        $("#LiveDate").show();
    } else {
        $("#LiveDate").prop("disabled", true);
    }
});
</code></pre>