mirror of
https://github.com/tenrok/OverlayScrollbars.git
synced 2026-06-21 14:10:36 +03:00
README update
This commit is contained in:
@@ -517,17 +517,12 @@ instance.sleep();</pre>
|
|||||||
<pre lang="js">
|
<pre lang="js">
|
||||||
//get scroll information
|
//get scroll information
|
||||||
var scrollInfo = instance.scroll();
|
var scrollInfo = instance.scroll();
|
||||||
|
|
||||||
//scroll 50px on both axis
|
//scroll 50px on both axis
|
||||||
instance.scroll(50);
|
instance.scroll(50);
|
||||||
|
|
||||||
//add 10px to the scroll offset of each axis
|
//add 10px to the scroll offset of each axis
|
||||||
instance.scroll({ x : "+=10", y : "+=10" });
|
instance.scroll({ x : "+=10", y : "+=10" });
|
||||||
|
|
||||||
//scroll to 50% on both axis with a duration of 1000ms
|
//scroll to 50% on both axis with a duration of 1000ms
|
||||||
instance.scroll({ x : "50%", y : "50%" }, 1000);
|
instance.scroll({ x : "50%", y : "50%" }, 1000);
|
||||||
|
|
||||||
|
|
||||||
//scroll to the passed element with a duration of 1000ms
|
//scroll to the passed element with a duration of 1000ms
|
||||||
instance.scroll($(selector), 1000);</pre>
|
instance.scroll($(selector), 1000);</pre>
|
||||||
</td>
|
</td>
|
||||||
@@ -618,7 +613,6 @@ var extensionInstance = instance.addExt("myExtension");</pre>
|
|||||||
<pre lang="js">
|
<pre lang="js">
|
||||||
//add the registered extension "myExtension" to the plugin instance
|
//add the registered extension "myExtension" to the plugin instance
|
||||||
instance.addExt("myExtension");
|
instance.addExt("myExtension");
|
||||||
|
|
||||||
//remove the added extension "myExtension" from the plugin instance
|
//remove the added extension "myExtension" from the plugin instance
|
||||||
instance.removeExt("myExtension");</pre>
|
instance.removeExt("myExtension");</pre>
|
||||||
</td>
|
</td>
|
||||||
@@ -691,16 +685,12 @@ var extensionObjects = OverlayScrollbars.extension();</pre>
|
|||||||
<pre lang="js">
|
<pre lang="js">
|
||||||
//create OverlayScrollbars instance
|
//create OverlayScrollbars instance
|
||||||
var osInstance = OverlayScrollbars(document.body, { });
|
var osInstance = OverlayScrollbars(document.body, { });
|
||||||
|
|
||||||
//returns true
|
//returns true
|
||||||
OverlayScrollbars.valid(osInstance);
|
OverlayScrollbars.valid(osInstance);
|
||||||
|
|
||||||
//destroy the instance
|
//destroy the instance
|
||||||
osInstance.destroy();
|
osInstance.destroy();
|
||||||
|
|
||||||
//returns false
|
//returns false
|
||||||
OverlayScrollbars.valid(osInstance);
|
OverlayScrollbars.valid(osInstance);
|
||||||
|
|
||||||
//returns false
|
//returns false
|
||||||
OverlayScrollbars.valid({ });</pre>
|
OverlayScrollbars.valid({ });</pre>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user