index.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <title>jScrollPane - cross browser styleable scrollbars with jQuery and CSS</title>
  6. <!-- styles specific to demo site -->
  7. <link type="text/css" href="style/demo.css" rel="stylesheet" media="all" />
  8. <!-- styles needed by jScrollPane - include in your own sites -->
  9. <link type="text/css" href="style/jquery.jscrollpane.css" rel="stylesheet" media="all" />
  10. <!-- latest jQuery direct from google's CDN -->
  11. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  12. <!-- the mousewheel plugin -->
  13. <script type="text/javascript" src="script/jquery.mousewheel.js"></script>
  14. <!-- the jScrollPane script -->
  15. <script type="text/javascript" src="script/jquery.jscrollpane.min.js"></script>
  16. <!-- scripts specific to this demo site -->
  17. <script type="text/javascript" src="script/demo.js"></script>
  18. </head>
  19. <body>
  20. <div id="top-nav">
  21. <img src="image/logo.png" width="196" height="69" alt="jScrollPane">
  22. <ul>
  23. <li><a href="#">Home</a></li>
  24. <li><a href="#examples">Examples</a></li>
  25. <li><a href="#themes">Themes</a></li>
  26. <li><a href="#usage">How to use</a></li>
  27. <li><a href="faqs.html">FAQs</a></li>
  28. <li><a href="known_issues.html">Known issues</a></li>
  29. <li><a href="#support">Support</a></li>
  30. <li><a href="#download">Download</a></li>
  31. </ul>
  32. </div>
  33. <div id="container">
  34. <h1>jScrollPane - cross browser styleable scrollbars with jQuery and CSS</h1>
  35. <p class="intro">
  36. jScrollPane is a cross-browser <a href="http://jquery.com">jQuery</a> plugin by
  37. <a href="http://www.kelvinluck.com">Kelvin Luck</a> which converts a browser's default scrollbars (on
  38. elements with a relevant overflow property) into an HTML structure which can be easily skinned with CSS.
  39. </p>
  40. <p>
  41. jScrollPane is designed to be flexible but very easy to use. After you have <a href="#download">
  42. downloaded</a> and <a href="#usage">included</a> the relevant files
  43. in the head of your document all you need to to is call one javascript function to initialise the
  44. scrollpane. You can style the resultant scrollbars easily with CSS or choose from the existing
  45. <a href="#themes">themes</a>. There are a number of different <a href="#examples">examples</a> showcasing
  46. different features of jScrollPane and a number of ways for you to get <a href="#support">support</a>.
  47. </p>
  48. <h2 id="usage">How to use</h2>
  49. <p>
  50. It is very simple to use jScrollPane. You will need to <a href="#download">download</a> the necessary
  51. files and place them on your server. Then you just need to include the relevant files in the &lt;head&gt;
  52. of your document:
  53. </p>
  54. <pre>&lt;!-- styles needed by jScrollPane --&gt;
  55. &lt;link type="text/css" href="style/jquery.jscrollpane.css" rel="stylesheet" media="all" /&gt;
  56. &lt;!-- latest jQuery direct from google's CDN --&gt;
  57. &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;
  58. &lt;/script&gt;
  59. &lt;!-- the mousewheel plugin - optional to provide mousewheel support --&gt;
  60. &lt;script type="text/javascript" src="script/jquery.mousewheel.js"&gt;&lt;/script&gt;
  61. &lt;!-- the jScrollPane script --&gt;
  62. &lt;script type="text/javascript" src="script/jquery.jscrollpane.min.js"&gt;&lt;/script&gt;</pre>
  63. <p>
  64. Then you just need to initialise jScrollPane on document.ready (using a selector which will find the
  65. content you want to apply jScrollPane to):
  66. </p>
  67. <pre>$(function()
  68. {
  69. $('.scroll-pane').jScrollPane();
  70. });</pre>
  71. <p>
  72. There are plenty of different ways to use jScrollPane - either passing in different <a href="settings.html">
  73. settings</a> when you initialise it or by using the <a href="api.html">API</a>. Each of these different
  74. use cases is covered by an <a href="#examples">example</a> linked to from below.
  75. </p>
  76. <h2 id="download">Download</h2>
  77. <p>
  78. You can always find the latest code for jScrollPane on its <a href="http://github.com/vitch/jScrollPane">
  79. github</a> page. You can either check out this entire website (including all examples) via git, or you
  80. can use the handy github functionality to <a href="http://github.com/vitch/jScrollPane/archives/master">
  81. download a zip</a> of the repository.
  82. </p>
  83. <p>
  84. The particular files that you need are:
  85. </p>
  86. <ul class="link-list">
  87. <li>
  88. <a href="style/jquery.jscrollpane.css">jquery.jscrollpane.css</a> - the basic CSS styles that are
  89. needed for jScrollPane to work.
  90. </li>
  91. <li>
  92. <a href="http://www.jquery.com">The jQuery library</a> - although I recommend including this
  93. directly from a CDN like I do above and in all of the examples.
  94. </li>
  95. <li>
  96. <a href="script/jquery.mousewheel.js">jquery.mousewheel.js</a> - The
  97. <a href="http://github.com/brandonaaron/jquery-mousewheel/">jQuery mouseweel</a> plugin. This is
  98. optional but recommended, include it to allow people to scroll your content using their mouse wheel.
  99. </li>
  100. <li>
  101. <a href="script/mwheelIntent.js">mwheelIntent.js</a> - The
  102. <a href="http://www.protofunc.com/scripts/jquery/mwheelIntent/">mwheelIntent</a> plugin. This is
  103. totally optional but can increase the usability of the mousewheel in nested scroll areas.
  104. <a href="mwheel_intent.html">See demo</a>.
  105. </li>
  106. <li>
  107. <a href="script/jquery.jscrollpane.min.js">jquery.jscrollpane.min.js</a> - the actual javascript file
  108. for jScrollPane (you can also get the <a href="script/jquery.jscrollpane.js">unminified</a> version
  109. if yu want to see the sourcecode and read the comments).
  110. </li>
  111. </ul>
  112. <h2 id="examples">Simple examples/ tests</h2>
  113. <p>
  114. These examples show very basic functionality and exist so that I can test that any changes to
  115. jScrollPane work cross browser and don't cause any new problems. Note that these examples aren't meant
  116. to look pretty, they merely highlight different bits of functionaity which are available. If you want
  117. examples of jScrollPane looking good then check out the <a href="#themes">themes</a>.
  118. </p>
  119. <ul class="link-list">
  120. <li>
  121. <a href="basic.html">Demo</a> showing basic scrolling (horizontal, vertical and combined)
  122. </li>
  123. <li>
  124. <a href="arrows.html">Demo</a> showing basic scrolling (horizontal, vertical and combined) with
  125. arrow buttons
  126. </li>
  127. <li>
  128. <a href="focus.html">Demo</a> showing how the contents of the scrollpane is focused as you tab to it
  129. </li>
  130. <li>
  131. <a href="caps.html">Demo</a> showing how you can set "caps" and "gutters" to change the size and
  132. positioning of the scrollbar relative to the content it is scrolling
  133. </li>
  134. <li>
  135. <a href="drag_size.html">Demo</a> showing how you can restrict the minimum and maxium size of the
  136. drag part of the scrollbar
  137. </li>
  138. <li>
  139. <a href="arrow_hover.html">Demo</a> showing how the <a href="settings.html#arrowScrollOnHover">
  140. arrowScrollOnHover</a> option makes the arrow buttons automatically scroll the content when you
  141. hover over them
  142. </li>
  143. <li>
  144. <a href="arrow_positions.html">Demo</a> showing how the <a href="settings.html#verticalArrowPositions">
  145. verticalArrowPositions</a> and <a href="settings.html#horizontalArrowPositions">
  146. horizontalArrowPositions</a> options can change the position of the arrow buttons
  147. </li>
  148. <li>
  149. <a href="scroll_to.html">Demo</a> showing how you can use the <a href="api.html#scrollTo">scrollTo
  150. </a> and <a href="api.html#scrollBy">scrollBy</a> methods of the API
  151. </li>
  152. <li>
  153. <a href="scroll_to_animate.html">Demo</a> showing how you can use the <a href="api.html#scrollTo">
  154. scrollTo</a> and <a href="api.html#scrollBy">scrollBy</a> methods of the API along with the
  155. <a href="settings.html#animateScroll">animateScroll</a> which enables animation when scrolling
  156. </li>
  157. <li>
  158. <a href="anchors.html">Demo</a> showing how you can make internal links automatically scroll the
  159. scrollpane (and how <a href="anchors.html#para4">external links</a> can link directly into content
  160. within a jScrollPane)
  161. </li>
  162. <li>
  163. <a href="invisibles.html">Demo</a> showing that jScrollPane can work correctly on elements which are
  164. initially set to be invisible via CSS
  165. </li>
  166. <li>
  167. <a href="less_basic.html">Demo</a> showing vertical scrolling with multiple panes on the same page
  168. and adding dynamic content and then reinitialising one of the panes
  169. </li>
  170. <li>
  171. <a href="dynamic_content.html">Demo</a> showing how you can manually <a href="api.html#reinitialise">
  172. reinitialise</a> the scrollpane if you add dynamic content to it
  173. </li>
  174. <li>
  175. <a href="ajax.html">Demo</a> showing how you can change the content of your jScrollPane via an ajax
  176. call and can reinitialise the scrollpane once the new content has loaded
  177. </li>
  178. <li>
  179. <a href="auto_reinitialise.html">Demo</a> showing how jScrollPane can be set to automatically
  180. reinitialise itself on a timer via the <a href="settings.html#autoReinitialise">autoReinitialise</a>
  181. parameter
  182. </li>
  183. <li>
  184. <a href="image.html">Demo</a> showing how <a href="settings.html#autoReinitialise">autoReinitialise
  185. </a> can also be used so that content with images in it displays correctly in jScrollPane
  186. </li>
  187. <li>
  188. <a href="dynamic_width.html">Demo</a> showing how jScrollPane can be reinitialised when the width of
  189. it's container changes and will update to fill the available space
  190. </li>
  191. <li>
  192. <a href="dynamic_height.html">Demo</a> showing how jScrollPane can be reinitialised when the height
  193. of it's container changes and will update to fill the available space
  194. </li>
  195. <li>
  196. <a href="fullpage_scroll.html">Demo</a> showing how jScrollPane can be applied to an entire page
  197. so that the browser's default scrollbars for the page are replaced. This demo also shows that you
  198. can nest jScrollPanes and everything will still work correctly.
  199. </li>
  200. <li>
  201. <a href="iframe.html">Demo</a> showing how jScrollPane can be used to style the scrollbars in an
  202. iframe.
  203. </li>
  204. <li>
  205. <a href="scroll_on_left.html">Demo</a> showing how vertical scrollbars can also appear on the left
  206. hand side of content
  207. </li>
  208. <li>
  209. <a href="short.html">Demo</a> showing that no scrollbars are created when the content is too short
  210. to scroll
  211. </li>
  212. <li>
  213. <a href="events.html">Demo</a> showing the events that are dispatched by an element you apply
  214. jScrollPane to.
  215. </li>
  216. </ul>
  217. <h2 id="themes">Themes</h2>
  218. <p>
  219. You can style jScrollPane however you like using simple CSS. To give you some ideas, here are a variety
  220. of different themes which you are free to <a href="#download">download</a> and use or modify:
  221. </p>
  222. <ul>
  223. <li><a href="themes/lozenge/">Lozenge</a> - lozenge shaped sliders and small arrow buttons</li>
  224. </ul>
  225. <h2 id="support">Support</h2>
  226. <p>
  227. Before trying to get support please check if your problem is a <a href="known_issues.html">known
  228. issue</a> or if it is mentioned in the <a href="faqs.html">FAQs</a>. If your issue is a new one and
  229. you can't find any information about it then you can try one of the following two options:
  230. </p>
  231. <ul>
  232. <li>
  233. <p>
  234. Using the <a href="http://stackoverflow.com">StackOverflow</a> site. This is probably the
  235. place you are most likely to get a quick answer as many Javascript experts spend time on
  236. the site. It also provides niceties like pretty formatting of posted sourcecode.
  237. </p>
  238. <p>
  239. If you ask a question on the site make sure you add the tags "jquery" and "jscrollpane" as
  240. I will be monitoring these tags to try to provide support.
  241. </p>
  242. </li>
  243. <li>
  244. <p>
  245. Through the <a href="http://groups.google.com/group/jscrollpane/">jScrollPane google group
  246. </a> - sign up and then you can start a discussion (either by email or through the web
  247. interface).
  248. </p>
  249. <p>
  250. Please remember to use the search field at the top of the group's homepage to search the
  251. archive to find out if your question has been answered before.
  252. </p>
  253. </li>
  254. </ul>
  255. <p>
  256. If you have contacted support and established that your problem is definitely a bug then you can
  257. <a href="http://github.com/vitch/jScrollPane/issues">raise an issue</a> on the project's github
  258. site.
  259. </p>
  260. <h2 id="history">History</h2>
  261. <p>
  262. jScrollPane was originally developed in December 2006. Since then it has been constantly updated to
  263. fix bugs and add new features. The change history since November 2008 is available in the jScrollPane
  264. <a href="http://github.com/vitch/jScrollPane">git repository</a>. In August 2010 a major rewrite was
  265. undertaken, starting from a blank canvas and adding long awaited features like horizontal scrolling
  266. and automatic reinitialisation. If you want to find old versions of jScrollPane then you can check out
  267. the <a href="changelog.html">changelog</a>.
  268. </p>
  269. <h2 id="credits">Credits</h2>
  270. <p>
  271. Thanks to <a href="http://www.hoppermagic.com">Hoppermagic</a> for creating the jScrollPane logo! And
  272. thanks to Mark Reed, Philip Leff and <a href="http://www.erwinodendaal.com">Erwin Odendaal</a> for
  273. sponsoring the development of v2 of this plugin (particularly to enable horizontal scrolling).
  274. </p>
  275. <h2 id="donate">Donate</h2>
  276. <p>
  277. jScrollPane is a personal project that is open source for anybody to use as they want to. If you (and
  278. your clients!) like jScrollPane then please consider donating to it's ongoing development. You can do
  279. so via Pledgie or Paypal using the images below:
  280. </p>
  281. <p style="margin-top: 0; float: left;">
  282. <a href='http://www.pledgie.com/campaigns/12524'>
  283. <img alt='Click here to lend your support to: jScrollPane and make a donation at www.pledgie.com !'
  284. src='http://www.pledgie.com/campaigns/12524.png?skin_name=chrome' border='0'
  285. />
  286. </a>
  287. </p>
  288. <form method="post" action="https://www.paypal.com/cgi-bin/webscr" style="margin: 15px 0 0 20px;">
  289. <input type="hidden" value="_donations" name="cmd">
  290. <input type="hidden" value="V2UG6D75CZ4SS" name="business">
  291. <input type="hidden" value="GB" name="lc">
  292. <input type="hidden" value="jScrollPane" name="item_name">
  293. <input type="hidden" value="GBP" name="currency_code">
  294. <input type="hidden" value="PP-DonationsBF:btn_donate_SM.gif:NonHosted" name="bn">
  295. <input type="image" alt="" name="submit" style="border: 0pt none;" src="https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif">
  296. <img height="1" border="0" width="1" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" style="padding: 0pt;" alt="">
  297. </form>
  298. </div>
  299. </body>
  300. </html>