Personal License FREE

1 site, unlimited servers No source distribution Commercial use allowed Can modify source Read full license

You need to log-in or create an account
  • Create an account
  • Log-in
  • Please use your real name.
  • Account activation link will be sent to this address.
  • Minimum 8 characters

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

(1 ratings)

Horizontal Javascript SrollPane

A horizontal JQuery ScrollPane with dragging and optional mouse-wheel support.

Description

Add horizontal scrollpane to your web pages contents.

Back to top

Installation

  1. Unzip horizontal--javascript-srollpane.3.0.zip

  2. Open scrollpaneh.html and see example.

  3. Usage:

Include the following files in the head of your page:

jQuery (I'm using 1.5.2 here) the mouse wheel plugin (if you want mouse wheel support) the jQEm plugin (if you want your scroll panes to automagically resize when the user changes text size) jScrollPaneH.js jScrollPaneH.css

<script type="text/javascript" src="scripts/jquery-1.2.6.min.js"></script>
<script type="text/javascript" src="scripts/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="scripts/jquery.em.js"></script>
<script type="text/javascript" src="scripts/jScrollPaneH.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="styles/jScrollPaneH.css" />

Then you can use any query selector to select the elements you would like to apply jScrollPane and then initialize it. The following code runs when the document is ready and finds any element with a class of "scroll-pane" and then calls jScrollPane on them.

$(function()
{
    $('.scroll-pane').jScrollPaneH();
});

You can pass some optional parameters to the jScrollPane function. These take the form of an object with the following attributes:

// Height of the created scrollbar in pixels (defaults to 10)
scrollbarHeight [int]

// Margin to leave to the left of the scrollbar in pixels (defaults to 5)
scrollbarMargin [int]

// Scroll speed in pixels per wheel step (defaults to 18)
wheelSpeed [int]

// Show arrow navigation (defaults to false)
showArrows [boolean] 

// Height of the arrow navigation if showArrows=true (calculated from CSS if not provided)
arrowSize [int]

// Animate when calling scrollTo and scrollBy (defaults to false)
animateTo [boolean] 

// Drag bar minimum height (defaults to 0)
dragMinHeight [int] 

// Drag bar maximum height (defaults to 99999!)
dragMaxHeight [int] 

// Animation update interval in milliseconds (default 100)
animateInterval [int] 

// Number of steps to run animation through (default 3)
animateStep [int]

// Maintain position when content is changed (default true)
maintainPosition [boolean] 

// Scrollbar appears on top of the content (CSS should also reflects this)
scrollbarOnTop [boolean] 

// Automatically re-initialise  when any contained images are loaded (defaults to false)
reinitialiseOnImageLoad [boolean] 

Questions & Comments

No questions have been posted yet

Leave a comment

You must be logged-in to leave a comment.
Log-in now or register for a free account.
You must be logged-in to vote. Log-in to your account or register now.
View all 1 reviews »

User Reviews