locomotivemtl / locomotive-scroll

🛤 Detection of elements in viewport & smooth scrolling with parallax.
https://locomotivemtl.github.io/locomotive-scroll
MIT License
7.93k stars 1.11k forks source link

this.scrollbarContainer.append is not a function #388

Open gregorvoinov opened 2 years ago

gregorvoinov commented 2 years ago

Hello 👋

if I add this option

this.scroller = new this.$locomotiveScroll({
  el,
  scrollbarContainer: true, <<<<<<<<
  smooth: true
}); 

I get this error

this.scrollbarContainer.append is not a function

I'm using

"locomotive-scroll": "^4.1.3",
"nuxt": "^2.15.7"

What I want to achieve is to attach the scrollbar inside my mobile app preview container

image

Thank you 👊

yousukesakaguchi commented 2 years ago

It seems that 'scrollbarContainer' option is not necessary for customize scroll bar anymore. If you set 'scrollbarClass' option, scrollbar element with your className would be appended end of body. If don't, scrollbar element with class "c-scrollbar" would be appended end of body.

presiyan-peev commented 9 months ago

scrollbarContainer is an object. It must represent an HTML element