/ContainedScroll

Perfect Scrollbar Fork

Primary LanguageJavaScript

This is a fork of the perfect scrollbar project.

Ironically, it wasn't perfect.

It didn't have support to have the scroll bar outside of the container, nor did it allow for support the have the rail be a different size than the content.

All of the other scroll plugins are terrible when used on multiple platforms (i.e. touch,mouse) so it just a matter of modifying this one.

Most of the documentation is the same, except for one new option that was added to control the scale of the scroll rail.

scrollSizeRatio: Number //Default 1

The ratio of the rail size to the content. <1 = Smaller

Since a lot of the functionality was not needed and bandwidth was a concern, certain features have been removed.

Horizontal Scrolling: Completely removed. No options related to it will function.

Keyboard Support: Removed keyboad support. Mousewheel remains.

IE6 Support: IE6 Support was removed.

Data Keys: All data keys had the string "perfect-scrollbar" replaced with "contained-scroll"

Init Method: Init Method renamed to containedScroll. // Initialize $(ele).containedScroll({ options: 1 });

<div class="dropDownContain">
    <div class="dropDown">
         <div class="contain">
             <!-- Content to Scroll -->
         </div>
    </div>
    <div class="ps-ycontain">
         <div class="ps-scrollbar-y-rail">
               <div class="ps-scrollbar-y"></div>
         </div>
     </div>
</div>