Truncate text to lines, not number of characters
trunk8 is a JS library that helps truncate text to a specific number of lines, not characters.
$('#t8-lines').trunk8({
lines: 2
});
In the end we'll have something like:
The library also provides features like custome fill</code>, update</code>, etc.
Written by Tu Hoang
Related protips
1 Response
Solid. Very solid. This will make frontend dev work much easier for the designer's eyes looking over my shoulder. Couple this with the proper character fall back, and it's a daggom fine tool. Thanks for sharing.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#