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.

Tejus Parikh

I'm a software engineer that writes occasionally about building software, software culture, and tech adjacent hobbies. If you want to get in touch, send me an email at [my_first_name]@tejusparikh.com.