Jquery/Javascript









Jquery/Javascript plugin to truncate text to fit container height and width

by johna | July 6, 2011
I recently needed a Javascript function to truncate text to fit a container such as a DIV, not just in width but in height. I found plenty of functions that truncate to width but couldn't find anything by height so I created this Jquery plugin that does the job. Please note that it does not handle HTML so if HTML content is truncated it may truncate mid-tag and break the display.

About

...random postings about web development and programming, Internet, computers and electronics topics.

I recommend ASPnix for web hosting and Crazy Domains for domain registration.

Subscribe

Get the latest posts delivered to your inbox.