Well you can replace '!, into spaces and then count Also I'd do a loop and remove empty elements (if multiple paces was in text) before counting.
On 24 Lie, 13:25, Raju <raju3...@gmail.com> wrote: > Hi > > i want a jquery plugin to view word files, > > can somebody help me out in this regards > > Warm Regards, > > Mari Raj K, > Bangalore > +91 9916140688 > > On Fri, Jul 24, 2009 at 3:49 PM, Liam Potter <radioactiv...@gmail.com>wrote: > > > > > you don't need a plugin, this will do it > > > var string = $("span.string").text(); > > var count = string.split(" "); > > alert(count.length); > > > Conrad Cheng wrote: > > >> Hi all, > >> Any jquery plugin can check number of word in a string instead using of > >> .length?... > > >> Many thanks. > > >> Conrad