This project is a fork from floating-scroll. The main reason why we forked the project is because we use it and we also needed to extend it quickly. The biggest feature of it is the option parameter that will be detailed below.
The general purpose of the plugin is to provide some lengthy containers on the page with a separate horizontal scroll bar, which does not vanish from sight when the entire page is scrolled. So, the user will always be able to scroll the container even if its own scroll bar is outside the viewport.
Moreover, the plugin displays such an additional floating scroll bar only in case of actual need, i.e. floatingScroll does not result in unnecessary scroll bar duplication. So, one uses the floating scroll bar only if the “native” one is out of sight.
There is the only public method used to instantiate and control a floating scroll — .floatingScroll(). The plugin method .floatingScroll() should be called in context of a scrollable container. It takes an optional argument method. The currently supported methods are
init (default value) — used to initialize a floating scroll widget;
update — used to force update of the floating scroll bar parameters (size and position);
destroy — removes a scroll bar and all related event handlers.
You may also trigger events update.fscroll and destroy.fscroll on containers with attached floating scroll bar: this does the same as invoking the corresponding methods.
Inclusion of plugin files
The plugin requires the CSS file jquery.floatingscroll.css to be included on the page (you may also import it in your CSS/LESS files). The plugin’s script file jquery.floatingscroll.min.js may be added on the web page either via a separate