Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to use data-lines (or similar) on the element #12

Open
m9dfukc opened this issue Oct 10, 2012 · 2 comments
Open

Option to use data-lines (or similar) on the element #12

m9dfukc opened this issue Oct 10, 2012 · 2 comments
Milestone

Comments

@m9dfukc
Copy link

m9dfukc commented Oct 10, 2012

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.

@woozyking
Copy link

👍

@fchristant
Copy link

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")
});
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants