Disable submit button if all character counters aren't OK
<p>We have a very simple word counter that is working fine enough for our needs. We now need to make a modification to it though. Please see our JSfiddle at <a href="http://jsfiddle.net/MUSXU/1" rel="nofollow">http://jsfiddle.net/MUSXU/1</a></p>

<pre><code>(function($){
    $.fn.textareaCounter = function(options) {
        // setting the defaults
        // $("textarea").textareaCounter({ limit: 100 });
        var defaults = {
            limit: 100
        };  
        var options = $.extend(defaults, options);

        // and the plugin begins
        return this.each(function() {
            var obj, text, wordcount, limited;

            obj = $(this);
            obj.after('&lt;span style="font-size: 11px; clear: both; margin-top: 3px; display: block;" id="counter-text"&gt;Max. '+options.limit+' words&lt;/span&gt;');

            obj.keyup(function() {
                text = obj.val().replace(/\s+/g, " ");;
                if(text === "") {
                    wordcount = 0;
                } else {
                    wordcount = $.trim(text).split(" ").length;
                    var URLs = text.match(/([^\s])+\.(com|net|org|biz|gov|edu|mobi|info|ca|us|mil)/g);
                    if(URLs != null &amp;&amp; URLs.length &gt; 0){
                      wordcount += (URLs.length*2);
                    }
                }
                if(wordcount &gt; options.limit) {
                   obj.next().html('&lt;span style="color: #DD0000;"&gt;-' + parseInt(wordcount - options.limit, 10) + ' words left&lt;/span&gt;');

                    $("#submit").prop('disabled', true);
                } else {
                    obj.next().html((options.limit - wordcount)+' words left');
                $("#submit").prop('disabled', false);
                } 
            });
        });
    };
})(jQuery);
$('textarea').textareaCounter({limit:15});
</code></pre>

<p>We have one issue though:</p>

<ol>
<li>We need the submit button to remain disabled if ANY of the character counters on the page are over their limits. Right now, the way we have it coded, the submit button is successfully disabled when the word count goes over, but it's immediately re-enabled as soon as you type into the next textarea.  </li>
</ol>

<p>I am not that great at javascript and have just sort of hacked this together for our needs, and this is the final thing that I need working before we can deploy it.</p>

<p>I'd appreciate any help you can lend.</p>
