Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce3a199cb3 | ||
|
|
d5db8ca18e | ||
|
|
89174ed99f | ||
|
|
6e7e3f94fa | ||
|
|
7d61475e1d | ||
|
|
2f8daae695 | ||
|
|
5ce0d77f87 | ||
|
|
f811bbcab5 | ||
|
|
4593eb9115 | ||
|
|
b3b1bc2454 | ||
|
|
25e5be13ff | ||
|
|
f683b01959 |
14
README.md
14
README.md
@@ -106,22 +106,26 @@ You can fork the following JSFiddles for testing and experimenting purposes:
|
||||
* [Perfect Scrollbar](https://jsfiddle.net/DanielApt/xv0rrxv3/)
|
||||
* [Perfect Scrollbar (jQuery)](https://jsfiddle.net/DanielApt/gbfLazpx/)
|
||||
|
||||
## Requirements
|
||||
|
||||
To make this plugin *perfect*, some requirements were unavoidable.
|
||||
But, they're all very trivial and there is nothing to worry about.
|
||||
## Before using perfect-scrollbar
|
||||
|
||||
The following requirements should meet.
|
||||
|
||||
* the container must have a 'position' css style.
|
||||
* the container must be a normal container element.
|
||||
* PS may not work well in `body`, `textarea`, `iframe` or flexbox.
|
||||
|
||||
The following requirements are included in the basic CSS, but please
|
||||
keep in mind when you'd like to change the CSS files.
|
||||
|
||||
* the container must have an 'overflow:hidden' css style.
|
||||
* the container must have an 'overflow: hidden' css style.
|
||||
* the scrollbar's position must be 'absolute'.
|
||||
* the scrollbar-x must have a 'bottom' css style, and the scrollbar-y
|
||||
must have a 'right' css style.
|
||||
|
||||
Please keep in mind that perfect-scrollbar won't completely emulate native
|
||||
scrolls. Scroll hooking is generally considered as bad practice, and
|
||||
perfect-scrollbar should be used with care. Unless custom scroll is really needed,
|
||||
please consider using native scrolls.
|
||||
|
||||
## How to use
|
||||
|
||||
|
||||
13
package.json
13
package.json
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "perfect-scrollbar",
|
||||
"version": "0.6.13",
|
||||
"version": "0.6.16",
|
||||
"description": "Minimalistic but perfect custom scrollbar plugin",
|
||||
"author": "Hyunje Alex Jun <me@noraesae.net>",
|
||||
"author": "Hyunje Jun <me@noraesae.net>",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Hyunje Alex Jun",
|
||||
"name": "Hyunje Jun",
|
||||
"email": "me@noraesae.net"
|
||||
}
|
||||
],
|
||||
@@ -30,7 +30,8 @@
|
||||
"dist",
|
||||
"src",
|
||||
"index.js",
|
||||
"jquery.js"
|
||||
"jquery.js",
|
||||
"perfect-scrollbar.d.ts"
|
||||
],
|
||||
"devDependencies": {
|
||||
"browserify": "^11.2.0",
|
||||
@@ -50,9 +51,7 @@
|
||||
},
|
||||
"jspm": {
|
||||
"main": "./index.js",
|
||||
"dependencies": {
|
||||
"jquery": "npm:jquery"
|
||||
}
|
||||
"registry": "jspm"
|
||||
},
|
||||
"typings": "perfect-scrollbar.d.ts",
|
||||
"scripts": {
|
||||
|
||||
6
perfect-scrollbar.d.ts
vendored
6
perfect-scrollbar.d.ts
vendored
@@ -13,9 +13,9 @@ interface PerfectScrollbarOptions {
|
||||
}
|
||||
|
||||
interface PerfectScrollbar {
|
||||
initialize(container: HTMLElement, options?: PerfectScrollbarOptions);
|
||||
update(container: HTMLElement);
|
||||
destroy(container: HTMLElement);
|
||||
initialize(container: HTMLElement, options?: PerfectScrollbarOptions): void;
|
||||
update(container: HTMLElement): void;
|
||||
destroy(container: HTMLElement): void;
|
||||
}
|
||||
|
||||
interface JQuery {
|
||||
|
||||
@@ -152,9 +152,7 @@ function bindTouchHandler(element, i, supportsTouch, supportsIePointer) {
|
||||
i.event.bind(element, 'touchstart', touchStart);
|
||||
i.event.bind(element, 'touchmove', touchMove);
|
||||
i.event.bind(element, 'touchend', touchEnd);
|
||||
}
|
||||
|
||||
if (supportsIePointer) {
|
||||
} else if (supportsIePointer) {
|
||||
if (window.PointerEvent) {
|
||||
i.event.bind(window, 'pointerdown', globalTouchStart);
|
||||
i.event.bind(window, 'pointerup', globalTouchEnd);
|
||||
|
||||
Reference in New Issue
Block a user