kswedberg / jquery-expander

Expand and Collapse HTML content
https://kswedberg.github.io/jquery-expander/
Other
459 stars 168 forks source link

Truncate whole word instead of characters #65

Closed thanh1259 closed 11 years ago

thanh1259 commented 11 years ago

The summary text was truncated based on number of character, how can I truncated on whole word.

monsto commented 11 years ago

Take a look at the options. preserveWords is what you're looking for. Together with widow: 0 you get fine control of the slice point. (i think widow defaults to 1 or 2)

thanh1259 commented 11 years ago

Thanks for your response. I'll check and let you know.