Trying to enable/disable an input text when a chekbox is unchecked/checked
<p>I'm trying to enable/diable an input text when a chekbox is checked/unchecked</p>

<p>I have tried this below but it doesn't work..</p>

<pre><code>  $('#checkbox').change(function(){


    if($('#name').attr('disabled') == 'true')
      $('#name').attr('disabled', 'false');
    else
      $('#name').attr('disabled', 'true');

  });
</code></pre>

<p>Any help?</p>

<p>Regards</p>

<p>Javi</p>
