vrynrw
Last Updated: February 25, 2016
·
2.286K
· rebyn
3

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.

Say Thanks
Respond

1 Response
Add your response

2643
Bfb4833e40676616e28300a0b9f55d35

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 ·