Skip to content
jQuery plugin for truncating text by number of words
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


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:

You can’t perform that action at this time.