This jQuery plugin will truncate text to a specified number of characters without splitting a word in half.
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
LICENSE.txt
README.md
limit.text.js
limit.text.min.js

README.md

Limit Text jQuery Plugin

This jQuery plugin will truncate text to a specified number of characters without splitting a word in half.

Example one:

// Default 100 characters and an "..." ellipis
$('#example-1').limitText();

Example two:

// Customized and chained
$('#example-2').limitText({
    length:65,
    ellipsisText: '[...]'})
.css('color', '#800000');