Plugins

User login
Can't find a Plugin?

Can't find a Plugin you are looking for? Check out the jQuery Wiki page.

Are you a plugin developer? Please move your plugin over to this site.

Website Bug or Feature Request?

Found a bug on the new jQuery Plugin website? Have a feature request?

Submit it to the jQuery Plugin website issue queue to ensure it is noticed!

HTML Truncator


Average rating
(2 votes)

"More"/"less" style truncation. Handles HTML gracefully: doesn't split inside HTML entities, doesn't orphan end-tags and so on.

Example usage:

$(function() {
  $('.example').truncate({max_length: 24});
});

Overriding all defaults:

$(function() {
  $('.example').truncate({max_length: 24, more: "plus it", less: "nevermind"});
});

I will try to keep this page up-to-date but may forget. See http://github.com/henrik/jquery.truncator.js for the latest version.

Releases

Official releasesDateSizeLinksStatus
1.0.12008-Sep-242.75 KBRecommended for 1.0.xThis is currently the recommended release for 1.0.x.