This is not difficult in JavaScript - there is sample code here (you need to look at the source to find out how it works, but it works). As far as I know, this is independent of jQuery or other libraries.
You can do this in JavaScript by finding the DOM node that interests you and grab it .innerHTML by adding around the first word and returning it to .innerHTML.