jQuery.smarttruncation can be used for building text excerpts.
This is done automatically by the plugin which uses a predefined length to calculate the number of displayed characters and removes the rest adding an ellipsis instead.
The plugin also works for dynamic situations like resizing the browser window, or accessing the site from a mobile device.
This is because it calculates the width for each character ahead of time, so it always knows the size of the text before it has to cut it.
Multiple truncation modes are supported, all detailed in the included examples.
Features:
- Simple end line truncation mode
- Center truncation mode
- Protect file extension mode
What is new in this release:
- Added test suite.
Requirements:
- JavaScript enabled on client side
- jQuery
Limitations:
- The plugin currently doesn't work too well with tables.
Comments not found