Simple Textarea Word Counter jQuery Plugin

Posted In Web Development - By On Thursday, October 20th, 2011 With 0 Comments

I know there are a few textarea word counter jQuery plugins out there already, but I felt like building my own since I wasn’t a fan of the ones that are available. Nothing new here but I did my best at making it as simple to use and efficient as possible.

/**

* jQuery.textareaCounter

* Version 1.0

* Copyright (c) 2011 c.bavota - http://bavotasan.com

* Dual licensed under MIT and GPL.

* Date: 10/20/2011

**/

(function($){

$.fn.textareaCounter = function(options) {

// setting the defaults

// $("textarea").textareaCounter({ limit: 100 });

var defaults = {

limit: 100

};

var options = $.extend(defaults, options);

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>