Very nice. I may have a need for something like this in an upcoming
project.

This truncates based on character count. What I'll ultimately need to
do is truncate text based on a maximum width. I would need to
initially display only one line with the option to show/hide any
remaining text. To do that I need to determine how many characters for
any text displayed with a given font, size, weight, style can be
displayed within a given width. If I could calculate how many
characters would fit within a space I could this plugin to truncate at
the calculated character count.

Is calculating such a value even possible with Javascript?

Thanks,

Brad

On Aug 8, 7:41 pm, Giant Jam Sandwich <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I am happy to announce that I have updated this jQuery plugin after I
> received quite a few requests for a very useful feature. The plugin
> now supports the ability to reveal the text that has been truncated,
> as well as the ability to click and re-truncate. The JavaScript is
> still 1KB, which really speaks to jQuery's motto, which is "write
> less. do more." I could not agree more.
>
> http://www.reindel.com/truncate
>
> Thank you everyone for taking the time to offer feedback.
>
> Brian

Reply via email to