Multiple Instances of Jquery WordCount

Trying to use the jquery wordcount plugin on multiple instances of textareas on my site.   Missing something obvious.  The first one works but the rest do not.

<script type="text/javascript">
 * jQuery.textareaCounter
 * Version 1.0
 * Copyright (c) 2011 c.bavota -
 * Dual licensed under MIT and GPL.
 * Date: 10/20/2011
	$.fn.textareaCounter = function(options) {
		// setting the defaults
		// $("textarea").textareaCounter({ limit: 100 });
		var defaults = {
			limit: 300
		var options = $.extend(defaults, options);
		// and the plugin begins
		return this.each(function() {
			var obj, text, wordcount, limited;
			obj = $(this);
			obj.after('<span style="font-size: 11px; clear: both; margin-top: 3px; display: block;" id="counter-text">Max. '+options.limit+' words</span>');

			obj.keyup(function() {
			    text = obj.val();
			    if(text === "") {
			    	wordcount = 0;
			    } else {
				    wordcount = $.trim(text).split(" ").length;
			    if(wordcount >= options.limit) {
			        $("#counter-text").html('<span style="color: #DD0000;">0 words left</span>');
					limited = $.trim(text).split(" ", options.limit);
					limited = limited.join(" ");
			    } else {
			        $("#counter-text").html((options.limit - wordcount)+' words left');

<script type="text/javascript">

Open in new window

Each of the textboxes have the id listed above.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Using v2 it works fine, maybe it wasn't possible in v1 and there is nothing in the code to suggest it can be bound to more than 1 textarea
digitalwiseAuthor Commented:
Do you have a link to v2?
Actually  I think I was looking at a different plugin :^)

Anyway the one you are using is not programmed for multiple instances.
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

digitalwiseAuthor Commented:
I guess I was looking to try to adjust the code so it could handle more than one instance.  The one you are referencing doesn't do anything for me - I need to limit the word count.
I will have a look at the plugin you are using and see if I can fix it a bit later
$("#counter-text").html((options.limit - wordcount)+' words left');

$(this).next("#counter-text").html((options.limit - wordcount)+' words left');

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.