title: How to toggle enable/disable input field based on radio button
body: <p>I have a group of radio buttons with the lase option "Other" and an input <code>field type text</code>. By default the input field is disabled, if you click on "Other" radio button the field is then enabled. How do I disable the input field if the select on radio button is changed?</p>
  
  <p>This is my code:</p>
  
  <pre><code>$(document).ready(function(){
       $("#text-inputt").prop('disabled', true)
   });
  $("#lastt").click(function(){ $("#text-inputt").prop('disabled', false/true)});
  </code></pre>
  
  <p>this code is not disabling the input field if you change the radio select.</p>
  
  <p><strong>UPDATE 1</strong>
  I'm trying this:</p>
  
  <pre><code> $(document).ready(function(){
       $("#text-inputt").prop('disabled', true);
   });
  $("#lastt").click(function(){ 
  if($(this).is(':checked')) {
        $("#text-inputt").prop("disabled", false);
    }  else {
        $("#text-inputt").prop("disabled", true);
    }  
  });
  </code></pre>
  
  <p>But is not setting the input to disable if you change the radio button.</p>