rviscomi / trunk8

jQuery Truncation Plugin -- THIS PROJECT IS NO LONGER MAINTAINED
MIT License
703 stars 95 forks source link

trunk8 dosent apply to display:none element #22

Closed jiMuBao closed 11 years ago

jiMuBao commented 11 years ago

I have couple of paragraph that are in display:none, and trunk8 does not apply to it.

rviscomi commented 11 years ago

Wontfix. It's a prerequisite for content to have layout on the page in order to calculate the optimal truncation. Without this, it is not possible to determine the dimensions of the text container.

As a suggestion, when the content is finally displayed you can do something like this:

$('.hide-me').show().trunk8();