textarea limit code injquery

By December 24, 2011 Jquery
Best example for limit of textarea and find count

<meta http-equiv=”Content-type” content=”text/html; charset=utf-8″ />
<title>jQuery test</title>

body {font-family:arial;}
 <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js” type=”text/javascript”></script>
 <script type=”text/javascript”>
 //runs once page is loaded and ready to be manipulated
        var maxNum=100;
            keypress : function() {
                var inputText = $(this).val();
                var numChar = inputText.length;
                var charRemain = maxNum-numChar;
                if (numChar <= maxNum) {
                }else if (numChar > maxNum){
    <textarea cols=”50″ rows=”5″ id=”status” maxlength=’100′></textarea>
    <div class=”counter”></div>