jQuery – Word and Character Counter
A small script to count the number of words and/or characters in an input or textarea field <input id=”text” name=”text” type=”text” /> <span id=”count”></span> We place the script in jQuery’s ready function to make sure the HTML has been fully loaded. $(document).ready(function() { count($(“#text”), $(“#count”)); $(“#text”).keyup(function() { count($(“#text”), $(“#count”)); }); }); function count(src, dest) { … Read more