-
Notifications
You must be signed in to change notification settings - Fork 102
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
Remove function issues #44
Remove function issues #44
Comments
A bit more info. addScrollBarComponents: function () { The unwrap function would work if we used wrap instead of wrapInner. Although I like the idea of it putting the elements inside instead of outside. here is a possible way to resolve the issue. removeScrollbarComponents: function () { |
I was having the same problem, Jevedor's suggestion worked for me. |
Thanks, Jevedor's solution solved my problem! |
Yes Jevedor's solution working good +1 |
refs mzubala#44 "remove" api method
I am finding the remove functionality does not work properly.
As per the documentation this should remove the markup:
$(".container").customScrollbar("remove");
The issue is, it does not properly remove the added "overview" and "viewport" elements. Looking in the code the issue is the use of unwrap.
removeScrollbarComponents: function () {
this.removeScrollbar("vertical");
this.removeScrollbar("horizontal");
if (this.overviewAdded)
this.$element.unwrap();
if (this.viewPortAdded)
this.$element.unwrap();
},
unwrap removes what is wrapping the element not what the element is wrapping. Thus this function ends up removing elements above the container instead of removing viewport and overview elements.
The text was updated successfully, but these errors were encountered: