Submitted by madmatter23 on Sat, 12/03/2011 - 16:24
// Wrap each word in a span.
$('#main-nav a').each(function(){
var text = $(this).text().split(' ');
for( var i = 0, len = text.length; i < len; i++ ) {
text[i] = '<span class="word-' + i + '">' + text[i] + '</span>';
}
$(this).html(text.join(' '));
});
Comments
Jin Micro
Tue, 03/27/2012 - 11:03
Permalink
Thanks for your help on the
Thanks for your help on the span tag. Really appreciate it!
Add new comment