Comments (4)
A bit more info.
The culprit to this issue is that in the function that adds the viewport and overview elements the code uses the wrapInner method.
addScrollBarComponents: function () {
this.assignViewPort();
if (this.$viewPort.length == 0) {
this.$element.wrapInner("<div class="viewport" />");
this.assignViewPort();
this.viewPortAdded = true;
}
this.assignOverview();
if (this.$overview.length == 0) {
this.$viewPort.wrapInner("<div class="overview" />");
this.assignOverview();
this.overviewAdded = true;
}
this.addScrollBar("vertical", "prepend");
this.addScrollBar("horizontal", "append");
},
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 () {
this.removeScrollbar("vertical");
this.removeScrollbar("horizontal");
if (this.overviewAdded)
this.$overview.replaceWith(this.$overview.contents());
if (this.viewPortAdded)
this.$viewPort.replaceWith(this.$viewPort.contents());
},
from jquery-custom-scrollbar.
I was having the same problem, Jevedor's suggestion worked for me.
from jquery-custom-scrollbar.
Thanks, Jevedor's solution solved my problem!
from jquery-custom-scrollbar.
Yes Jevedor's solution working good +1
from jquery-custom-scrollbar.
Related Issues (20)
- Issue with removeWindowResize
- keyboard scroll does not work if child element of scrollable element focused
- Scroller doesn' t appear and scroll content "falled down"
- Doesn`t work if scroll block is display none HOT 2
- Mouse Wheel Not Working
- Help needed related to touchScroll content and parent content too
- Using jquery-custom-scrollbar on iframe HOT 2
- Does not work when used in unordered/ordered list
- while div resize or content add more character and element , the scrollbar is not repaint after it
- "remove" API method does not work as expected HOT 2
- Not using namespaced events is breaking websites using jQuery events HOT 3
- Safari support
- Take the porn out of the demos HOT 3
- Error in customScrollbar("scrollByY",100) HOT 1
- How to.....
- Select input scrolling issue
- Completely hiding divs when using %'s
- Scrolling in select input shouldt scroll page
- Unwillingness to propogate events prevents nesting of other swipeable elements on mobile
- Doesn't work with css calc() sizes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-custom-scrollbar.