JQuery Word Counter | Lessoncup Programming Blog

Monday, 20 June 2016

JQuery Word Counter

The Simple Textarea jQuery word counter plugin this simple script will useful you to restrict the user to enter limited words inside the textarea like we have seen in twitter tweet box and many websites and you can also use this script custom websites and admin panel lets see the simple script


insert the text area box and give it name like word_count and insert one more tag as you like i just take span tag to display word count value i just give it name like display_count  see the bellow code for more view

<div id="container">
    <textarea name="word_count" id="word_count" ></textarea>
       <span style="color:#06F">Total word Count : <span id="display_count">0</span>


in this section insert the jquery plugin in next step i just take the custom function name it like wordCount inside the function i just calling the fn method it is default method in jquery plugin and the wordConter is a variable to display the word counts

now take the keypress function inside this i am using regular expressions and assigning it to textbox length after complete the custom function of wordCount assign it to textbox we already named it like #word_count  see the last line of jquery code
<script type="text/javascript" src="jquery-1.12.2.min.js"></script>

<script type="text/javascript">

 $.fn.wordCount = function(params){
 var text = {
 if(params) {
  this.extend(text, params);

Live Demo   Download Script


  1. Now this jquery word counter will be very useful to a lot of us. I really don't understand why twitter has limited character when tweeting and how best essays I've ever ordered also has limited words when submitted to me.

  2. Great! It sounds good. Thanks for sharing.. free word counter

  3. I thought haven’t read such distinctive material anywhere else on-line.
    design firm San Francisco

  4. What kind of games do the Seminoles offer? | jtmhub.com
    What kinds of 군포 출장샵 games do the 논산 출장마사지 Seminoles offer? Are you an expert in 공주 출장안마 Seminole 속초 출장마사지 game betting? How 안산 출장샵 do you see the Seminoles' chances of winning?

  5. เป็นแบรนด์รวมค่ายเกมส์สล็อต betflixauto ชั้นนำของทั่วประเทศมารวมกัน พร้อมระบบการเล่น เกมค่าย betflix789 ทำงานด้วยระบบออโต้ ได้พัฒนาอย่างต่อเนื่อง เพื่อความรวดเร็ว


Mohammad Khasim
Blogger | Web Developer
Hyderabad - INDIA

Web Development Tools | CMS | Frameworks | SEO

Get my Latest Lessons