Ads

Thursday, 25 September 2014

Scrollator - Replacement for the browsers scroll bar

Download   Demo


This plugin Scrollator is a jQuery-based replacement for the browsers scroll bar, which doesn’t use any space. Has very good performance.


1. INCLUDE JS FILES


<script src="jquery-1.11.0.min.js"></script>
<script src="fm.scrollator.jquery.js"></script>

2. HTML


<div id="scrollable_div1">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam rhoncus, felis interdum condimentum consectetur, nisl libero elementum eros, vehicula congue lacus eros non diam. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus mauris lorem, lacinia id tempus non, imperdiet et leo. Cras sit amet erat sit amet lacus egestas placerat. Aenean ultricies ultrices mauris ac congue. In vel tortor vel velit tristique tempus ac id nisi. Proin quis lorem velit. Nunc dui dui, blandit a ullamcorper vitae, congue fringilla lectus. Aliquam ultricies malesuada feugiat. Vestibulum placerat turpis et eros lobortis vel semper sapien pulvinar.<br>
...
</div>

3. JAVASCRIPT


$('#scrollable_div1').scrollator();

4. OPTIONS


$('#scrollable_div1').scrollator(
custom_class: '', // A class to be added to this scrollator lane
zIndex: '', // z-index to be added to the scrollator lane
);

5. METHODS


Global methods






MethodDescription
Scrollator.refreshAllResize and reposition all scrollators

jQuery methods












MethodDescription
destroyThis method is used to remove the instance of the plugin from the element box
refreshResize and reposition the scrollator
showShow the scrollator
hideHide the scrollator

Method usage



$('#scrollable_div').numbertor('destroy');


6. CSS CLASSES


Here is a list of all the css classes


















ClassDescription
#scrollator_holderThe main scrollator holder has this id
scrollatorThis class is added to the scrollable elements which scrollator is added to
scrollator_lane_holderThe scrollator lane holder
scrollator_laneThe scrollator lane
scrollator_on_bodyThis class is added to the scrollator lane, if it is the lane of a body element
scrollator_handle_holderThe scrollator handle holder
scrollator_handleThe scrollator handle

 



Scrollator - Replacement for the browsers scroll bar

No comments:

Post a Comment