$('h1').filter(function() { return $(this).text().length > _count; }).wrapInner(function() //need to target each char not all inside h1 { return '<span id="' + this.nodeValue + '" />'; // id or class doesnt matter }); //this.nodeValue should be the text but function isnt standalone
I didnt realize there was a Lettering.JS but i will deff look at the documentation. I took a step back and realized the main code i was using had redundancies and recursive functions (I wanted so bad to use some :( ). But i am packing all of it into a plugin in which does what i explained but adds more methods and a shload of customizable stuff.
Thanks for the responses btw, i have been hitting the jQuery forums pretty hard and waited until now (when i finally fixed it) to check my post. Again, thanks guys for the help.
The html output
What i WANT to happen:
Source: http://jsfiddle.net/john_motyl/aWC2w/1/
I didnt realize there was a Lettering.JS but i will deff look at the documentation. I took a step back and realized the main code i was using had redundancies and recursive functions (I wanted so bad to use some :( ). But i am packing all of it into a plugin in which does what i explained but adds more methods and a shload of customizable stuff.
Thanks for the responses btw, i have been hitting the jQuery forums pretty hard and waited until now (when i finally fixed it) to check my post. Again, thanks guys for the help.