trunk8
trunk8 copied to clipboard
Option to use data-lines (or similar) on the element
Would be nice to define a data element on the tag which states the amount of lines it should shorten to. Doing this manually in a loop for now but would be nice to have this build in.
:+1:
I agree it would be a nice feature. For now, I'm also using this loop, which is simply enough:
$('[data-truncate="true"]').each(function( index, element ) { $(element).trunk8({ lines: $(this).data("truncate-lines") }); });