rviscomi / trunk8

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

Added onTruncate init parameter / success function #52

Closed kfreytag closed 9 years ago

kfreytag commented 9 years ago

onTruncate can be passed at initialization time. It is a function that will fire if trunk8 does actually truncate the text. If trunk8 does not truncate the text, the passed function will not fire.

This is useful if the front-end needs to be modified / decorated in some custom manner when trunk8 successfully truncates text but left alone when there is no truncation.

kfreytag commented 9 years ago

Updated to reference settings.onTruncate directly (did not instantiate local var)

rviscomi commented 9 years ago

Looks good. Thanks.

kfreytag commented 9 years ago

You bet. Thanks for such a useful tool.