Is it possible in jquery to wrap each nth word in a span
so lets say I have the html string
<h3>great Prices great Service</h3>
this will be wrapped as follows ( each 2nd word )
<h3>great <span>Prices</span> great <span>Service</span></h3>
Any help will be appreciated
http://jsfiddle.net/H5zzq/
or
http://jsfiddle.net/H5zzq/1
To deal with
&as you requested in your comment, I created anoffsetvariable that is incremented whenever one is encountered.http://jsfiddle.net/H5zzq/3