micjamking / succinct

A tiny jQuery plugin for truncating multiple lines of text
http://mikeking.io/succinct/
MIT License
479 stars 65 forks source link

Destroy succinct #19

Open gNesh01 opened 8 years ago

gNesh01 commented 8 years ago

Hi,

Is there any way to destroy succinct? Because I need it just on hover state, so when mouseleave I would like to destroy succinct.

Thanks

firestar300 commented 6 years ago

The best way is stock the innerHTML in a variable before use Succinct.

var content = $('.element').html() // or .text()

if (condition) {
   $(element).succinct({
      size: 120,
   })
} else {
   $('element').html(content)
}