jQuery splitLines() demos

Example of text split by lines

This is an example of some long text that we want to split into lines.
This is an example of some long text that we want to split into lines.

Example of text split by lines using span tags and a defined width

This is an example of some long text that we want to split into lines. We also set it to use a span tag and defined the width instead of using the original's width.
This is an example of some long text that we want to split into lines. We also set it to use a span tag and defined the width instead of using the original's width.

Example of text split by lines with a larger font

This is an example of some long and large text that we want to split into lines.
This is an example of some long and large text that we want to split into lines.

Example of text split with a line height

My line height is smaller than my ascendors and descendors!
My line height is smaller than my ascendors and descendors!

Example of text that contains html

Notice how the strong and emphasized tags are maintained during split.
Notice how the strong and emphasized tags are maintained during split.

Example of text split by lines, and cycling through each other

Here's a spiffy fading example use case for splitLines().

Another animation example

And a sliding example using splitLines() to split into equal chunks! Isn't it neat?

A test for using a width that's entirely too small

Long words will not fit into small widths!