README 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. * DEPENDENCIES
  14. It uses jquery framework, since 1.5.x version. (you can try with 1.4.x)
  15. * INSTALLATION
  16. Put loading script tag after jquery script tag:
  17. <script src="jquery.nicescroll.js"></script>
  18. * HOW TO USE
  19. Recall ALWAYS in (document) ready statement.
  20. 1. Simple mode, it styles document scrollbar:
  21. $(document).ready(
  22. function() {
  23. $("body").niceScroll();
  24. }
  25. );
  26. 2. Style scrollbars wit object returned:
  27. var scrollbars = false;
  28. $(document).ready(
  29. function() {
  30. scrollbars = $("body").niceScroll();
  31. }
  32. );
  33. 3. Style a DIV and chage cursor color:
  34. $(document).ready(
  35. function() {
  36. $("#thisdiv").niceScroll({cursorcolor:"#00F"});
  37. }
  38. );
  39. * CONFIGURATION PARAMETERS
  40. When you call "niceScroll" you can pass some parameters to custom visual aspects:
  41. . cursorcolor - change cursor color in hex, default is "#000000"
  42. . cursoropacitymin - change opacity very cursor is inactive (scrollabar "hidden" state), range from 1 to 0, default is 0 (hidden)
  43. . cursoropacitymax - change opacity very cursor is active (scrollabar "visible" state), range from 1 to 0, default is 1 (full opacity)
  44. . zindex - change z-index for scrollbar div, default value is 9999
  45. . scrollspeed - scrolling speed, default value is 60
  46. . mousescrollstep - scrolling speed with mouse wheel, default value is 48 (pixel)
  47. * LICENSE
  48. Copyright 2011*InuYaksa
  49. Licensed under the MIT License, http://www.opensource.org/licenses/mit-license.php