Skip to content
jQuery plugin for truncating text by number of words
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
example.html
jquery.truncate.js
jquery.truncate.min.js

README.md

truncate

Truncate is a jQuery plugin for shortening text in one or more content elements.

Invoking this method will limit elements' number of initially visible words, and will add a link to show (or hide) the full text. If the number of words in any of the elements is less than or equal to the limit, no link will appear.

It will also check for sentence-completing punctuation (. ? !) at the end of the cutoff word. If none exists, it will add ellipses.

Example and more info here: http://marcbrooks.com/2014/05/14/too-much-text-truncate-it/

You can’t perform that action at this time.