oreesh-scrollbar Class
A textarea with x-axis and y-axis scrolling for overflow.
// Can be created dynamically
var scrollbar = new OreeshScrollbar();
<!-- Or via HTML -->
<!-- Basic example with y-axis scrolling-->
<oreesh-scrollbar style="display: inline-block; width: 200px; height: 200px;" scroll-y>
... Lots of content ...
</oreesh-scrollbar>
<!-- X-axis scrolling -->
<oreesh-scrollbar style="display: inline-block; width: 200px; height: 200px;" scroll-x>
... Lots of content ...
</oreesh-scrollbar>
<!-- Both scrollbars-->
<oreesh-scrollbar style="display: inline-block; width: 100px; height: 100px;" scroll-x scroll-y>
... Lots of content ...
</oreesh-scrollbar>
<!-- with hover-to-show scroll bars which are animated -->
<oreesh-scrollbar style="display: inline-block; width: 100px; height: 100px;" scroll-y hover-to-show animation>
... Lots of content ...
</oreesh-scrollbar>
Item Index
Attributes
Events
Methods
getChildren
()
Returns the children in the content div.
scrollContentBottom
-
px
If this scrollbar has the scroll-y attribute, then this will scroll the content to the given (absolute) pixel value, and move the scroll bar accordingly. Added for convenience.
scrollbar.scrollContentBottom(50); // Scroll to 50px from the bottom
Parameters:
-
pxNumberThe pixel value that will be scrolled to from the bottom
scrollContentLeft
-
px
If this scrollbar has the scroll-x attribute, then this will scroll the content to the given (absolute) pixel value, and move the scroll bar accordingly.
scrollbar.scrollContentLeft(50); // Scroll to 50px from the left
Parameters:
-
pxNumberThe pixel value that will be scrolled to from the left
scrollContentTop
-
px
If this scrollbar has the scroll-y attribute, then this will scroll the content to the given (absolute) pixel value, and move the scroll bar accordingly.
scrollbar.scrollContentTop(50); // Scroll to 50px from the top
Parameters:
-
pxNumberThe pixel value that will be scrolled to from the top
scrollContentYRelative
-
direction -
px
If this scrollbar has the scroll-y attribute, then this will scroll the content relative to the current position.
scrollbar.scrollContentYRelative(1, 50); // Scroll 50px from the current position
Parameters:
-
directionNumberThe direction to scroll (positive vs negative)
-
pxNumberThe pixel value
Attributes
Events
scroll
Event which is fired if there is scrolling in any direction
Event Payload:
-
detail.axisStringIndiciates which axis was scrolled. Will be either
xory -
detail.topStringThe current
topstyling of the scrollbar -
detail.leftStringThe current
leftstyling of the scrollbar
