You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the content of an 'ellipsed' element is replaced, a second .ellipsis() on the element fails due to existing/wrong .data('jqae') internal storage of autoellipsis.
Scenario:
div.mydiv gets some content via .html( "lorem ipsum 1 long longer longest etc." )
$( '.mydiv' ).ellipsis() is called
content is 'ellipsed' ok, fine
div.mydiv is cleared with $( '.mydiv' ).empty()
div.mydiv gets new content via .html( "lorem ipsum 2 even longer or shorter or etc." )
$( '.mydiv' ).ellipsis() is called
content is not 'ellipsed', not as expected
The problem is that .empty() does (of course) not clear the .data( 'jqae' ) of div.mydiv and so the second call to $( '.mydiv' ).ellipsis() finds it and draws wrong conclusions.
Workaround, clear the .data('jqae') internal storage of autoellipsis before second call:
$( '.mydiv' ).data( 'jqae', null )
$( '.mydiv' ).ellipsis() is called
content is 'ellipsed' ok, fine
Thanks for this great plugin.
The text was updated successfully, but these errors were encountered:
If the content of an 'ellipsed' element is replaced, a second .ellipsis() on the element fails due to existing/wrong .data('jqae') internal storage of autoellipsis.
Scenario:
The problem is that .empty() does (of course) not clear the .data( 'jqae' ) of div.mydiv and so the second call to $( '.mydiv' ).ellipsis() finds it and draws wrong conclusions.
Workaround, clear the .data('jqae') internal storage of autoellipsis before second call:
Thanks for this great plugin.
The text was updated successfully, but these errors were encountered: