jQuery Limit Text Plugin Example

Example 1: Default usage

$('p').limitText(); // (100 characters and an "..." ellipis)

Before

Limit Text is a lightweight, cross-browser, and user-friendly jQuery text truncation plugin which truncates long text by characters and hides overflowing content using ellipsis (...) without breaking a word in half. jQuery Script.

After

Limit Text is a lightweight, cross-browser, and user-friendly jQuery text truncation plugin which truncates long text by characters and hides overflowing content using ellipsis (...) without breaking a word in half. jQuery Script.

Example 2: Length and Ellipsis customized

$('p').limitText({length: 65,ellipsisText: '[...]'})
.css('color', '#800000');

Before

Despite its mercurial nature, however, the house cat is the most popular pet in the world.

After

Despite its mercurial nature, however, the house cat is the most popular pet in the world.