Skip to content

Wrapping words with lettering('words')

davatron5000 edited this page Mar 5, 2011 · 1 revision

We applied the same technology of splitting letters into splitting words with lettering.

Here's an example of the .lettering('words') method:

<p class="word_split">Don't break my heart.</p>

<script>
$(document).ready(function() {
  $(".word_split").lettering('words');
});
</script>

Which will generate:

<p class="word_split">
  <span class="word1">Don't</span>
  <span class="word2">break</span>
  <span class="word3">my</span>
  <span class="word4">heart.</span>
</p>

You can then style each word using the .word# class.

Clone this wiki locally