jqDoubleScroll icon indicating copy to clipboard operation
jqDoubleScroll copied to clipboard

Destroy / remove event

Open tkodev opened this issue 8 years ago • 3 comments

How does one remove doubleScroll from an element? I'm using a virtual dom library (such as react) that constantly removes, then adds new elements. I need to know how to tear down doubleScroll to avoid creating two instances of doubleScroll on one element in case the element is only updated and not recreated.

tkodev avatar Sep 22 '17 14:09 tkodev

Ex: $(element).removeScroll();

tkodev avatar Sep 22 '17 14:09 tkodev

I just re-initialize the scrollbar after content update, and i do not see multiple scrollbars. so i don't think a remove function is needed.

JeroenvO avatar Apr 01 '18 17:04 JeroenvO

Or manually trigger the resize event, if you have resetOnWindowResize set to true using: $('.double-scroll').trigger('resize.doubleScroll');

JeroenvO avatar Apr 01 '18 17:04 JeroenvO