<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Creating a jQuery Word Counter</title>
	<atom:link href="http://blog.themeforest.net/tutorials/creating-a-jquery-word-counter/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.themeforest.net/tutorials/creating-a-jquery-word-counter/</link>
	<description>The ThemeForest Blog</description>
	<lastBuildDate>Mon, 27 Sep 2010 19:49:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: ASG</title>
		<link>http://blog.themeforest.net/tutorials/creating-a-jquery-word-counter/comment-page-1/#comment-21406</link>
		<dc:creator>ASG</dc:creator>
		<pubDate>Sun, 23 Aug 2009 15:27:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.themeforest.net/?p=1662#comment-21406</guid>
		<description>Great job.  Love the counter.  Thanks.</description>
		<content:encoded><![CDATA[<p>Great job.  Love the counter.  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: check-one</title>
		<link>http://blog.themeforest.net/tutorials/creating-a-jquery-word-counter/comment-page-1/#comment-16423</link>
		<dc:creator>check-one</dc:creator>
		<pubDate>Mon, 13 Jul 2009 17:15:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.themeforest.net/?p=1662#comment-16423</guid>
		<description>Modified to count words after line break and not to count multiple spaces as word:

$(document).ready(function() {
  $(&quot;[class^=&#039;count[&#039;]&quot;).each(function() {
    var elClass = $(this).attr(&#039;class&#039;);
    var minWords = 0;
    var maxWords = 0;
    var countControl = elClass.substring((elClass.indexOf(&#039;[&#039;))+1, elClass.lastIndexOf(&#039;]&#039;)).split(&#039;,&#039;);
		
    if(countControl.length &gt; 1) {
      minWords = countControl[0];
      maxWords = countControl[1];
    } else {
      maxWords = countControl[0];
    }	
		
    $(this).after(&#039;&lt;strong&gt;0&lt;/strong&gt; Words&#039;);
    if(minWords &gt; 0) {
      $(this).siblings(&#039;.wordCount&#039;).addClass(&#039;error&#039;);
    }	

    $(this).bind(&#039;keyup click blur focus change paste&#039;, function() {
      var number = 0;
      var numWords = $(this).val().match(/\b/g);

      if(numWords) {
        number = numWords.length/2;
      }

      $(this).siblings(&#039;.wordCount&#039;).children(&#039;strong&#039;).text(number);

      if(number  maxWords &amp;&amp; maxWords != 0)) {
        $(this).siblings(&#039;.wordCount&#039;).addClass(&#039;error&#039;);
      } else {
        $(this).siblings(&#039;.wordCount&#039;).removeClass(&#039;error&#039;);
      }
    });
  });
});</description>
		<content:encoded><![CDATA[<p>Modified to count words after line break and not to count multiple spaces as word:</p>
<p>$(document).ready(function() {<br />
  $(&#8220;[class^='count[']&#8220;).each(function() {<br />
    var elClass = $(this).attr(&#8216;class&#8217;);<br />
    var minWords = 0;<br />
    var maxWords = 0;<br />
    var countControl = elClass.substring((elClass.indexOf(&#8216;['))+1, elClass.lastIndexOf(']&#8216;)).split(&#8216;,&#8217;);</p>
<p>    if(countControl.length &gt; 1) {<br />
      minWords = countControl[0];<br />
      maxWords = countControl[1];<br />
    } else {<br />
      maxWords = countControl[0];<br />
    }	</p>
<p>    $(this).after(&#8216;<strong>0</strong> Words&#8217;);<br />
    if(minWords &gt; 0) {<br />
      $(this).siblings(&#8216;.wordCount&#8217;).addClass(&#8216;error&#8217;);<br />
    }	</p>
<p>    $(this).bind(&#8216;keyup click blur focus change paste&#8217;, function() {<br />
      var number = 0;<br />
      var numWords = $(this).val().match(/\b/g);</p>
<p>      if(numWords) {<br />
        number = numWords.length/2;<br />
      }</p>
<p>      $(this).siblings(&#8216;.wordCount&#8217;).children(&#8217;strong&#8217;).text(number);</p>
<p>      if(number  maxWords &amp;&amp; maxWords != 0)) {<br />
        $(this).siblings(&#8216;.wordCount&#8217;).addClass(&#8216;error&#8217;);<br />
      } else {<br />
        $(this).siblings(&#8216;.wordCount&#8217;).removeClass(&#8216;error&#8217;);<br />
      }<br />
    });<br />
  });<br />
});</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott</title>
		<link>http://blog.themeforest.net/tutorials/creating-a-jquery-word-counter/comment-page-1/#comment-15825</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Tue, 07 Jul 2009 16:24:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.themeforest.net/?p=1662#comment-15825</guid>
		<description>Very nice :D</description>
		<content:encoded><![CDATA[<p>Very nice <img src='http://blog.themeforest.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HTML, CSS, PHP and jQuery Killer Tutorials &#124; Evan Mullins Circlecube ReBlog</title>
		<link>http://blog.themeforest.net/tutorials/creating-a-jquery-word-counter/comment-page-1/#comment-13432</link>
		<dc:creator>HTML, CSS, PHP and jQuery Killer Tutorials &#124; Evan Mullins Circlecube ReBlog</dc:creator>
		<pubDate>Fri, 12 Jun 2009 17:07:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.themeforest.net/?p=1662#comment-13432</guid>
		<description>[...] Creating a jQuery Word Counter [...]</description>
		<content:encoded><![CDATA[<p>[...] Creating a jQuery Word Counter [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maicon</title>
		<link>http://blog.themeforest.net/tutorials/creating-a-jquery-word-counter/comment-page-1/#comment-10208</link>
		<dc:creator>Maicon</dc:creator>
		<pubDate>Tue, 12 May 2009 11:50:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.themeforest.net/?p=1662#comment-10208</guid>
		<description>I learned more about JQuery with this. Good work!</description>
		<content:encoded><![CDATA[<p>I learned more about JQuery with this. Good work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: In the Woods - HTML, CSS, PHP and jQuery Killer Tutorials</title>
		<link>http://blog.themeforest.net/tutorials/creating-a-jquery-word-counter/comment-page-1/#comment-9476</link>
		<dc:creator>In the Woods - HTML, CSS, PHP and jQuery Killer Tutorials</dc:creator>
		<pubDate>Thu, 30 Apr 2009 21:21:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.themeforest.net/?p=1662#comment-9476</guid>
		<description>[...] Creating a jQuery Word Counter [...]</description>
		<content:encoded><![CDATA[<p>[...] Creating a jQuery Word Counter [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nykeri</title>
		<link>http://blog.themeforest.net/tutorials/creating-a-jquery-word-counter/comment-page-1/#comment-9352</link>
		<dc:creator>Nykeri</dc:creator>
		<pubDate>Tue, 28 Apr 2009 20:39:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.themeforest.net/?p=1662#comment-9352</guid>
		<description>thanks man really nice</description>
		<content:encoded><![CDATA[<p>thanks man really nice</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jihad Aravassry</title>
		<link>http://blog.themeforest.net/tutorials/creating-a-jquery-word-counter/comment-page-1/#comment-8985</link>
		<dc:creator>Jihad Aravassry</dc:creator>
		<pubDate>Tue, 21 Apr 2009 16:38:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.themeforest.net/?p=1662#comment-8985</guid>
		<description>Good work!!</description>
		<content:encoded><![CDATA[<p>Good work!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: photoandpics.org &#187; Contador de palabras con jQuery</title>
		<link>http://blog.themeforest.net/tutorials/creating-a-jquery-word-counter/comment-page-1/#comment-8623</link>
		<dc:creator>photoandpics.org &#187; Contador de palabras con jQuery</dc:creator>
		<pubDate>Mon, 13 Apr 2009 21:11:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.themeforest.net/?p=1662#comment-8623</guid>
		<description>[...] Davis nos explica en In the Woods cómo crear un contador de palabras con [...]</description>
		<content:encoded><![CDATA[<p>[...] Davis nos explica en In the Woods cómo crear un contador de palabras con [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BillyG</title>
		<link>http://blog.themeforest.net/tutorials/creating-a-jquery-word-counter/comment-page-1/#comment-8506</link>
		<dc:creator>BillyG</dc:creator>
		<pubDate>Sat, 11 Apr 2009 09:33:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.themeforest.net/?p=1662#comment-8506</guid>
		<description>@Willabee
I apologize, the purpose of my first post was only to give you a hint about a &quot;problem&quot; you may overlooked. 
But as my post was not there the next day, I thought...
Anyway, you gave me two good hints here: About binding a function to multiple events and the hint about the regular expressions tutorials.
Thanks for this!</description>
		<content:encoded><![CDATA[<p>@Willabee<br />
I apologize, the purpose of my first post was only to give you a hint about a &#8220;problem&#8221; you may overlooked.<br />
But as my post was not there the next day, I thought&#8230;<br />
Anyway, you gave me two good hints here: About binding a function to multiple events and the hint about the regular expressions tutorials.<br />
Thanks for this!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

