title: Speed of JQM Textarea
body: <p>I am still working my way through JQM so forgive me if this is an easy question.</p>
  
  <p>I have the following JQM code I am working on but the issue I am noticing is when i try to drag the textarea down, it appears to be a bit slow in response:</p>
  
  <p>JQ</p>
  
  <pre><code>$(function() {
      $("#textbox").each(function() {
          var input = '#' + this.id;
          counter(input);
          $(this).keyup(function() {
              counter(input);
          });
      });
  });
  
  function counter(field) {
      var number = 0;
      var text = $(field).val();
      var word = $(field).val().split(/[ \n\r]/);
      words = word.filter(function(word) {
          return word.length &gt; 0 &amp;&amp; word.match(/^[A-Za-z0-9]/);
      }).length;
          $('.words').text(words);
  }
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>#main {
      margin: 0 auto;
      position: relative;
      width: 900px;
  }
  
  #textbox {
      margin: 30px auto;
      max-width: 700px;
      min-width: 700px;
      height: 300px;
      min-height: 300px;
  }
  </code></pre>
  
  <p>Below is both my code Fiddle and another Fiddle that appears to be much faster:</p>
  
  <p><a href="http://jsfiddle.net/6B9Ga/" rel="nofollow">My Fiddle</a></p>
  
  <p><a href="http://jsfiddle.net/j7b9A/7/" rel="nofollow">Faster Fiddle</a></p>
  
  <p>Is there anything I can do to increase the response speed or provide link to anywhere similar question had been asked.</p>
  
  <p>Thanks</p>