trunk8 is a jQuery plugin that intelligently truncates text by measuring actual visual overflow rather than simply cutting at a character limit, allowing customization of the truncation point (left, center, or right), filler text, line tolerance, and whether to preserve HTML structure. It includes methods to update text while maintaining truncation, revert to the original untruncated version, and retrieve current settings, plus a callback option that fires after truncation completes. The plugin is released under the MIT License and works automatically with sensible defaults or through configuration objects that override settings like the ellipsis symbol and number of lines allowed before truncation.
Permalink
pluginsopensourcejquery