How can I select the first word in a div?
I need to be able to insert a line break after the first word, or wrap it in a span tag. I need to do this for multiple di
This may help you
First Word in String with jquery
$('div.message').text(function(i,txt) { var name = $('div.name').text().split(' ')[ 0 ]; });