README 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. jquery.nicescroll
  2. v. 1.5.1 10-30-2011
  3. copyright 2011 InuYaksa*2011
  4. licensed under the MIT
  5. https://github.com/inuyaksa/jquery.nicescroll
  6. Nicescroll (as nice scroll for browsers) is a jquery (since 1.5) plugin, for nice scrollbars with a very similar ios/mobile style.
  7. It supports DIVs, IFrames and document page (body) scrollbars.
  8. Compatible with Firefox 4+, Chrome 5+, Safari 4+ (win/mac), Opera 10+, IE 6+. (all A-grade browsers)
  9. Only vertical scrollbars supported in this version.
  10. 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.
  11. Document (body) scrollbars can't appears, old (native browser) one is used.
  12. Some issues with IFrame scrolling.
  13. * FEATURES
  14. - simple installation and activation, it works with NO modification of your code. (some exceptions can happen, so you can write to me)
  15. - very stylish scrollbars, with no occupation on your window (original browser scrollbars need some of page space and reduces window/div usable width)
  16. - you can stile main document scrollbar (body) too!! (not all script implements this feature)
  17. - on all browsers you can scroll: dragging the cursor, mouse wheel (speed customizable), keyboard navigation (cursor keys, pagup/down keys, home/end keys)
  18. - scroll is smooth (as modern tablet browsing), speed is customizable
  19. - tested for all major browsers but with extended support, including IE6, Safari on Mac and IE10 preview!
  20. * DEPENDENCIES
  21. It uses jquery framework, since 1.5.x version. (you can try with 1.4.x)
  22. * INSTALLATION
  23. Put loading script tag after jquery script tag:
  24. <script src="jquery.nicescroll.js"></script>
  25. * HOW TO USE
  26. Recall ALWAYS in (document) ready statement.
  27. 1. Simple mode, it styles document scrollbar:
  28. $(document).ready(
  29. function() {
  30. $("body").niceScroll();
  31. }
  32. );
  33. 2. Style scrollbars wit object returned:
  34. var scrollbars = false;
  35. $(document).ready(
  36. function() {
  37. scrollbars = $("body").niceScroll();
  38. }
  39. );
  40. 3. Style a DIV and chage cursor color:
  41. $(document).ready(
  42. function() {
  43. $("#thisdiv").niceScroll({cursorcolor:"#00F"});
  44. }
  45. );
  46. * CONFIGURATION PARAMETERS
  47. When you call "niceScroll" you can pass some parameters to custom visual aspects:
  48. . cursorcolor - change cursor color in hex, default is "#000000"
  49. . cursoropacitymin - change opacity very cursor is inactive (scrollabar "hidden" state), range from 1 to 0, default is 0 (hidden)
  50. . cursoropacitymax - change opacity very cursor is active (scrollabar "visible" state), range from 1 to 0, default is 1 (full opacity)
  51. . zindex - change z-index for scrollbar div, default value is 9999
  52. . scrollspeed - scrolling speed, default value is 60
  53. . mousescrollstep - scrolling speed with mouse wheel, default value is 48 (pixel)
  54. * LICENSE
  55. Copyright 2011*InuYaksa
  56. Licensed under the MIT License, http://www.opensource.org/licenses/mit-license.php