title: ASP.NET TextBox - jQuery Counter function not being fired
body: <p>I have a jquery function that should count characters the user is typing in ASP.NET textbox. This information will appear on:</p>
  
  <pre><code>&lt;span ID="remaining" class="label"&gt;160 characters remaining&lt;/span&gt;
  &lt;span ID="messages" class="msgleft"&gt;1 message(s)&lt;/span&gt;   
  
  The jQUery function is shown below:
  
   &lt;script type="text/javascript"&gt;
          $(document).ready(function () {
              var $remaining = $('#remaining'),
          $messages = $remaining.next();
  
              $('#messagetext').keyup(function () {
                  var chars = this.value.length,
              messages = Math.ceil(chars / 160),
              remaining = messages * 160 - (chars % (messages * 160) || messages * 160);
  
                  $remaining.text(remaining + ' characters remaining');
                  $messages.text(messages + ' message(s)');
              });
          });
  &lt;/script&gt;
  </code></pre>
  
  <p>The ID of the ASP.NET Textbox is messagetext but jQuery function/event is not being fired. When I use HTML text area it works fine. Any idea ?</p>