title: Max characters in textarea with jquery
body: <p>I have the following code, and I'm kind of stuck on what to do next. The idea is when you enter text into a text area a counter tells you how many characters you have left. Once you get to the max characters I want to stop allowing characters to be entered, or delete all the characters that were entered so there are only 10 characters in the text area. I know I have to put the code where it says <code>alert("LONG");</code> but I'm not quite sure what.</p>
  
  <pre><code>var maxLen = 10;
          console.log("Start");
          $('#send-txt').keyup(function(){
              var Length = $("#send-txt").val().length;
              var AmountLeft = maxLen - Length;
              $('#txt-length-left').html(AmountLeft);
              if(Length &gt;= maxLen){
                  alert("LONG");
              }
  
  
  
          });
  </code></pre>