title: jquery keyup function: enabling/disabling a textbox using keyup()
body: <p>I am trying to disable the textbox using keyup functionality. I have a <strong>TextArea</strong> and a <strong>Text Box</strong>. Now i use a keyup operation on backspace key, like if the length of content inside textarea is 3 it should disable the textbox. I also have an alert message which pops when the length of content in text area is 3. Code worked for the pop up but it doesnot worked for the textbox. What am i missing? Please help. Here is my code:</p>
  
  <pre><code>$('#comment').keyup(function() {
      if (event.which == 8) {
             var txt = $('#comment').val().length;
              if(txt == 3)
              {
                  alert("backspace");
                  $("#text1").attr("diasbled", "diasbled");
              }
          }
  
  });
  </code></pre>
  
  <p>And here is the <a href="http://jsfiddle.net/mgY43/" rel="nofollow">JSfiddle</a> for the purpose.</p>