Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels