malihu / malihu-custom-scrollbar-plugin

Highly customizable custom scrollbar jQuery plugin, featuring vertical/horizontal scrollbars, scrolling momentum, mouse-wheel, keyboard and touch support etc.
http://manos.malihu.gr/jquery-custom-content-scroller
MIT License
4.11k stars 1.51k forks source link

mcsInSight does not appear to work #621

Open okadots opened 5 years ago

okadots commented 5 years ago

I am trying to change the classes of my content (for styling) as they are scrolled into view. I have not been able to get mcsInSight to return anything but false.

I have tried doing an if statement: if($('#myID').is(':mcsInSight')){ console.log('hello') } and nothing happens even when the div is clearly visible in the view port.

I have also tried to console.log it out on the onScroll callback and no matter what, it ALWAYS returns false. $('#myID').is(':mcsInSight')

I downloaded your examples and was able to get it to work in the callback example, but the same code will not work in my site. Does this only work for vertical examples?

Is my use case incorrect? I did not see much documentation or any examples using this pseudo expression