Collapser is a small and useful jQuery plugin for collapsing/truncating an element text by words, characters and lines with a flexible API. It is an all in one plugin with multiple functionalities to truncate a paragraph or any element as desired.
- Four modes of operation
- Truncate text by characters
- Truncate text by words
- Truncate text by lines
- Show/hide element
- HTML content present in the elements are preserved during the operation.
- Simple and flexible API for using in varied applications.
- Display remaining string count in the show/hide button.
- No complicated syntax or alterations required, can be used readily.
- Light weight only 4KB after minification.
- Works in all browsers. Tested till IE 7 and it works !
jQuery Collapser source is hosted in Github. Use the link below to download the entire package.
Plugin documentation is moved to a seperate page. Documentation page