Simple jQuery word count
I had a need today for a simple textarea word count script, so whipped this up using jQuery. It ain’t fancy, but it works:
$(document).ready(function(){
$(\”#text\”).keyup(function() {
$(’#count’).html($(’#text’).val().split(/\b[\s,\.-:;]*/).length);
});
});
I’ll leave it to you to remember you have to have jQuery in place, and sort out the IDs on the textarea […]