jquery.nicescroll
v. 1.5.1 10-30-2011
copyright 2011 InuYaksa*2011
licensed under the MIT
https://github.com/inuyaksa/jquery.nicescroll
Nicescroll (as nice scroll for browsers) is a jquery (since 1.5) plugin, for nice scrollbars with a very similar ios/mobile style.
It supports DIVs, IFrames and document page (body) scrollbars.
Compatible with Firefox 4+, Chrome 5+, Safari 4+ (win/mac), Opera 10+, IE 6+. (all A-grade browsers)
Only vertical scrollbars supported in this version.
Warning for IE6 users (who uses IE6 yet? Please updgrade to a more stable and modern browser), some feature can't work for limitation of the browser.
Document (body) scrollbars can't appears, old (native browser) one is used.
Some issues with IFrame scrolling.
* FEATURES
- simple installation and activation, it works with NO modification of your code. (some exceptions can happen, so you can write to me)
- very stylish scrollbars, with no occupation on your window (original browser scrollbars need some of page space and reduces window/div usable width)
- you can stile main document scrollbar (body) too!! (not all script implements this feature)
- on all browsers you can scroll: dragging the cursor, mouse wheel (speed customizable), keyboard navigation (cursor keys, pagup/down keys, home/end keys)
- scroll is smooth (as modern tablet browsing), speed is customizable
- tested for all major browsers but with extended support, including IE6, Safari on Mac and IE10 preview!
* DEPENDENCIES
It uses jquery framework, since 1.5.x version. (you can try with 1.4.x)
* INSTALLATION
Put loading script tag after jquery script tag:
* HOW TO USE
Recall ALWAYS in (document) ready statement.
1. Simple mode, it styles document scrollbar:
$(document).ready(
function() {
$("body").niceScroll();
}
);
2. Style scrollbars wit object returned:
var scrollbars = false;
$(document).ready(
function() {
scrollbars = $("body").niceScroll();
}
);
3. Style a DIV and chage cursor color:
$(document).ready(
function() {
$("#thisdiv").niceScroll({cursorcolor:"#00F"});
}
);
* CONFIGURATION PARAMETERS
When you call "niceScroll" you can pass some parameters to custom visual aspects:
. cursorcolor - change cursor color in hex, default is "#000000"
. cursoropacitymin - change opacity very cursor is inactive (scrollabar "hidden" state), range from 1 to 0, default is 0 (hidden)
. cursoropacitymax - change opacity very cursor is active (scrollabar "visible" state), range from 1 to 0, default is 1 (full opacity)
. zindex - change z-index for scrollbar div, default value is 9999
. scrollspeed - scrolling speed, default value is 60
. mousescrollstep - scrolling speed with mouse wheel, default value is 48 (pixel)
* LICENSE
Copyright 2011*InuYaksa
Licensed under the MIT License, http://www.opensource.org/licenses/mit-license.php