From 42d528a8392d6ba8fb4b4be6d288d47159a0388b Mon Sep 17 00:00:00 2001 From: Hyunje Alex Jun Date: Thu, 14 Mar 2013 13:44:51 +0900 Subject: [PATCH] Update README.md Optional parameter support. --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index fc78116..68f048e 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,20 @@ To make this plugin *perfect*, some requirements were not avoidable. But they're * the container must have a 'position' 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. + +Optional parameters +------------------- + +perfect-scrollbar supports optional parameters. + +### wheelSpeed +The scroll speed applied to mousewheel event. +Default: 10 + +### wheelPropagation +If this option is true, when the scroll reach the end of the side, mousewheel event will be propagated to parent element. +Default: false + How to Use ---------- @@ -63,6 +77,15 @@ When the html document is like above, just use like this: ```javascript $('#Demo').perfectScrollbar(); ``` + +With optional parameters: +```javascript +$("#Demo").perfectScrollbar({ + wheelSpeed: 20, + wheelPropagation: true +}) +``` + If the size of your container or content changes: ```javascript $('#Demo').perfectScrollbar('update');