settings.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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 - settings object documentation</title>
  6. <!-- styles specific to demo site -->
  7. <link type="text/css" href="style/demo.css" rel="stylesheet" media="all" />
  8. <!-- latest jQuery direct from google's CDN -->
  9. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  10. <!-- scripts specific to this demo site -->
  11. <script type="text/javascript" src="script/demo.js"></script>
  12. </head>
  13. <body>
  14. <div id="top-nav">
  15. <img src="image/logo.png" width="196" height="69" alt="jScrollPane">
  16. <ul>
  17. <li><a href="index.html">Home</a></li>
  18. <li><a href="index.html#examples">Examples</a></li>
  19. <li><a href="index.html#themes">Themes</a></li>
  20. <li><a href="index.html#usage">How to use</a></li>
  21. <li><a href="faqs.html">FAQs</a></li>
  22. <li><a href="known_issues.html">Known issues</a></li>
  23. <li><a href="index.html#support">Support</a></li>
  24. <li><a href="index.html#download">Download</a></li>
  25. </ul>
  26. </div>
  27. <div id="container">
  28. <h1>jScrollPane - settings object documentation</h1>
  29. <p>
  30. This page details the various options that you can pass into the settings object when you initialise
  31. jScrollPane. Note that there is also a number of changes you can make through the <a href="api.html">
  32. API</a> after the scrollpane is already initialised and a number of <a href="events.html">events</a> you
  33. can listen to.
  34. </p>
  35. <h2 id="showArrows">showArrows <span class="setting-type">- boolean (default false)</span></h2>
  36. <p>
  37. Whether arrows should be shown on the generated scroll pane. When set to false only the scrollbar track
  38. and drag will be shown, if set to true then arrows buttons will also be shown. <a href="arrows.html">
  39. Demo</a>.
  40. </p>
  41. <h2 id="maintainPosition">maintainPosition <span class="setting-type">- boolean (default true)</span></h2>
  42. <p>
  43. Whether the scrollpane should attempt to maintain it's position whenever it is reinitialised. If true
  44. then the viewport of the scrollpane will remain the same when it is reinitialised, if false then the
  45. viewport will jump back up to the top when the scrollpane is reinitialised. See also
  46. <a href="#stickToBottom">stickToBottom</a> and <a href="#stickToRight">stickToRight</a>.
  47. </p>
  48. <h2 id="stickToBottom">stickToBottom<span class="setting-type">- boolean (default false)</span></h2>
  49. <p>
  50. If <a href="#maintainPosition">maintainPosition</a> is true and the scrollpane is scrolled to the
  51. bottom then the scrollpane then the scrollpane will remain scrolled to the bottom even if new content
  52. is added to the pane which makes it taller.
  53. </p>
  54. <h2 id="stickToRight">stickToRight<span class="setting-type">- boolean (default false)</span></h2>
  55. <p>
  56. If <a href="#maintainPosition">maintainPosition</a> is true and the scrollpane is scrolled to its
  57. right edge then the scrollpane then the scrollpane will remain scrolled to the right edge even if new
  58. content is added to the pane which makes it wider.
  59. </p>
  60. <h2 id="autoReinitialise">autoReinitialise <span class="setting-type">- boolean (default false)</span></h2>
  61. <p>
  62. Whether jScrollPane should automatically reinitialise itself periodically after you have initially
  63. initialised it. This can help with instances when the size of the content of the scrollpane (or the
  64. surrounding element) changes. However, it does involve an overhead of running a javascript function on
  65. a timer so it is recommended only to activate where necessary. <a href="auto_reinitialise.html">Demo</a>.
  66. </p>
  67. <h2 id="autoReinitialiseDelay">autoReinitialiseDelay <span class="setting-type">- int (default 500)</span></h2>
  68. <p>
  69. The number of milliseconds between each reinitialisation (if <a href="#autoReinitialise">autoReinitialise</a>
  70. is true).
  71. </p>
  72. <h2 id="verticalDragMinHeight">verticalDragMinHeight <span class="setting-type">- int (default 0)</span></h2>
  73. <p>
  74. The smallest height that the vertical drag can have. The size of the drag elements is based on the
  75. proportion of the size of the content to the size of the viewport but is contrained within the minimum
  76. and maximum dimensions given. <a href="drag_size.html">Demo</a>.
  77. </p>
  78. <h2 id="verticalDragMaxHeight">verticalDragMaxHeight <span class="setting-type">- int (default 99999)</span></h2>
  79. <p>
  80. See <a href="#verticalDragMinHeight">verticalDragMinHeight</a>.
  81. </p>
  82. <h2 id="horizontalDragMinWidth">horizontalDragMinWidth <span class="setting-type">- int (default 0)</span></h2>
  83. <p>
  84. See <a href="#verticalDragMinHeight">verticalDragMinHeight</a>.
  85. </p>
  86. <h2 id="horizontalDragMaxWidth">horizontalDragMaxWidth <span class="setting-type">- int (default 99999)</span></h2>
  87. <p>
  88. See <a href="#verticalDragMinHeight">verticalDragMinHeight</a>.
  89. </p>
  90. <h2 id="contentWidth">contentWidth <span class="setting-type">- int (default undefined)</span></h2>
  91. <p>
  92. The width of the content of the scroll pane. The default value of undefined will allow jScrollPane to
  93. calculate the width of it's content. However, in some cases you will want to disable this (e.g. to
  94. prevent horizontal scrolling or where the calculation of the size of the content doesn't return reliable
  95. results)
  96. </p>
  97. <h2 id="animateScroll">animateScroll <span class="setting-type">- boolean (default false)</span></h2>
  98. <p>
  99. Whether to use animation when calling <a href="api.html#scrollTo">scrollTo</a> or <a href="api.html#scrollBy">
  100. scrollBy</a>. You can control the animation speed and easing by using the <a href="#animateDuration">
  101. animateDuration</a> and <a href="#animateEase">animateEase</a> settings or if you want to exercise more
  102. complete control then you can override the <a href="api.html#animate">animate</a> API method.
  103. <a href="scroll_to_animate.html">Demo</a>.
  104. </p>
  105. <h2 id="animateDuration">animateDuration <span class="setting-type">- int (default 300)</span></h2>
  106. <p>
  107. The number of milliseconds taken to animate to a new position (see <a href="#animateScroll">animateScroll
  108. </a>).
  109. </p>
  110. <h2 id="animateEase">animateEase <span class="setting-type">- string (default 'linear')</span></h2>
  111. <p>
  112. The type of easing to use when animating to a new position (see <a href="#animateScroll">animateScroll
  113. </a> and <a href="http://api.jquery.com/animate/#easing">easing</a>).
  114. </p>
  115. <h2 id="hijackInternalLinks">hijackInternalLinks <span class="setting-type">- boolean (default false)</span></h2>
  116. <p>
  117. Whether internal links on the page should be hijacked so that if they point so content within a
  118. jScrollPane then they automatically scroll the jScrollPane to the correct place. <a href="anchors.html">
  119. Demo</a>.
  120. </p>
  121. <h2 id="verticalGutter">verticalGutter <span class="setting-type">- int (default 4)</span></h2>
  122. <p>
  123. The amount of space between the side of the content and the vertical scrollbar.
  124. </p>
  125. <h2 id="horizontalGutter">horizontalGutter <span class="setting-type">- int (default 4)</span></h2>
  126. <p>
  127. The amount of space between the bottom of the content and the horizontal scrollbar.
  128. </p>
  129. <h2 id="mouseWheelSpeed">mouseWheelSpeed <span class="setting-type">- int (default 10)</span></h2>
  130. <p>
  131. A multiplier which is used to control the amount that the scrollpane scrolls each time the mouse wheel
  132. is turned.
  133. </p>
  134. <h2 id="arrowButtonSpeed">arrowButtonSpeed <span class="setting-type">- int (default 10)</span></h2>
  135. <p>
  136. A multiplier which is used to control the amount that the scrollpane scrolls each time on of the arrow
  137. buttons is pressed.
  138. </p>
  139. <h2 id="arrowRepeatFreq">arrowRepeatFreq <span class="setting-type">- int (default 100)</span></h2>
  140. <p>
  141. The number of milliseconds between each repeated scroll event when the mouse is held down over one of
  142. the arrow keys.
  143. </p>
  144. <h2 id="arrowScrollOnHover">arrowScrollOnHover <span class="setting-type">- boolean (default false)</span></h2>
  145. <p>
  146. Whether the arrow buttons should cause the jScrollPane to scroll while you are hovering over them.
  147. <a href="arrow_hover.html">Demo</a>.
  148. </p>
  149. <h2 id="verticalArrowPositions">
  150. verticalArrowPositions <span class="setting-type">- string [split|before|after|os] (default split)</span>
  151. </h2>
  152. <p>
  153. Where the vertical arrows should appear relative to the vertical track. <a href="arrow_positions.html">
  154. Demo</a>.
  155. </p>
  156. <h2 id="horizontalArrowPositions">
  157. horizontalArrowPositions <span class="setting-type">- string [split|before|after|os] (default split)</span>
  158. </h2>
  159. <p>
  160. Where the horizontal arrows should appear relative to the horizontal track. <a href="arrow_positions.html">
  161. Demo</a>.
  162. </p>
  163. <h2 id="enableKeyboardNavigation">
  164. enableKeyboardNavigation <span class="setting-type">- boolean (default true)</span>
  165. </h2>
  166. <p>
  167. Whether keyboard navigation should be enabled (e.g. whether the user can focus the scrollpane and then
  168. use the arrow (and other) keys to navigate around.
  169. </p>
  170. <h2 id="hideFocus">
  171. hideFocus <span class="setting-type">- boolean (default false)</span>
  172. </h2>
  173. <p>
  174. Whether the focus outline should be hidden in all browsers. For best accessibility you should not change
  175. this option. You can style the outline with the CSS property outline and outline-offset.
  176. </p>
  177. <h2 id="clickOnTrack">
  178. clickOnTrack <span class="setting-type">- boolean (default true)</span>
  179. </h2>
  180. <p>
  181. Whether clicking on the track (e.g. the area behind the drag) should scroll towards the point clicked on.
  182. Defaults to true as this is the native behaviour in these situations.
  183. </p>
  184. <h2 id="trackClickSpeed">trackClickSpeed <span class="setting-type">- int (default 30)</span></h2>
  185. <p>
  186. A multiplier which is used to control the amount that the scrollpane scrolls each trackClickRepeatFreq
  187. while the mouse button is held down over the track.
  188. </p>
  189. <h2 id="trackClickRepeatFreq">trackClickRepeatFreq <span class="setting-type">- int (default 100)</span></h2>
  190. <p>
  191. The number of milliseconds between each repeated scroll event when the mouse is held down over the
  192. track.
  193. </p>
  194. </div>
  195. </body>
  196. </html>