JQuery Line Ellipsis

Posted by Tejus Parikh on April 14, 2012

I’ve been using the jQuery Ellipsis plugin on a few projects. However, on my latest one, I had the need to truncate text not on fixed heights, but a set number of lines.

I modified the plugin to do just that and threw it up on github. The Line Ellipsis plugin is still a work in progress, since detecting the size of a line is very unreliable. If you try it out and have problems, open a GitHub ticket. Or better yet, create a pull request.

Related Posts:

Tejus Parikh

Tejus is an software developer, now working at large companies. Find out when I write new posts on twitter, via RSS or subscribe to the newsletter: