pk-scroll

Custom scrollbars written in plain JS, with jQuery and Angular wrappers featuring resize detection, mousewheel, touch and keyboard support
1 person uses it
Author: 4472254?v=2 sw4

pk-scroll

Customized scrollbars written in vanilla JS, complete with jQuery and angular wrappers (where libraries detected, neither are required).

Licensed under cc by-sa 3.0 with attribution required

Demo

Requires

pk-base.js and pk-base.css as a precursor

Features

  • Automatic resize handling (change in dimensions of container or content)
  • Mobile touch / drag support
  • Keyboard support
  • Mouse wheel support
  • Relies on native scroll events not positional offsets

Usage

Plain Javascript

pk.scroll({element:document.getElementById('yourEl'), axis:'xy'});*

*You can use any means to retrieve a DOM node to pass to pk.scroll()

jQuery

$('yourEl').pkScroll('xy');

Angular

Simply include pk-scroll as an application dependancy, add the attribute pk-scroll and set to either x, y, or xy on the relevant element and the pkScroll directive will automatically apply.

comments powered by Disqus
This page was last updated over 2 years ago.