title: jQuery character count
body: <p>I am working on a character count <a href="https://stackoverflow.com/questions/5371089/jquery-count-characters-in-textarea">based on this post</a>.<br/>
  I would like to call the function on window load but seem to be having issues, otherwise everything works.<br/>
  Can anyone lend a hand on getting the count on load please.<br/>
  <a href="http://jsfiddle.net/nalagg/PrtXH/" rel="nofollow noreferrer">heres my fiddle</a></p>
  
  <pre><code>function countChar(val){
      var len = val.value.length;
  
      if (len &gt;= 500) {
              val.value = val.value.substring(0, 500);
              $('#stat span').text(0);
      }else {
              $('#stat span').text(500 - len);
      }
  }
  
  $(function(){
      var inputT = $('#descTextArea').val();
      //countChar(inputT);//this is breaking the code
  
      $('#descTextArea').keyup(function(){
          countChar(this);
      });
  
  });
  </code></pre>