Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// great little typographic widow control script from chris coyier
$("h2 a").each(function() {
var wordArray = $(this).text().split(" ");
if (wordArray.length > 1) {
wordArray[wordArray.length-2] += " " + wordArray[wordArray.length-1];
$(this).html(wordArray.join(" "));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.