Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destroy / remove event #8

Open
tkodev opened this issue Sep 22, 2017 · 3 comments
Open

Destroy / remove event #8

tkodev opened this issue Sep 22, 2017 · 3 comments

Comments

@tkodev
Copy link

tkodev commented Sep 22, 2017

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
Copy link
Author

tkodev commented Sep 22, 2017

Ex: $(element).removeScroll();

@JeroenvO
Copy link

JeroenvO commented Apr 1, 2018

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
Copy link

JeroenvO commented Apr 1, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants