/********** (C)Scripterlative.com !!! READ THIS FIRST !!! -> This code is distributed on condition that all developers using it recognise the effort that -> went into producing it, by making a PayPal gratuity OF THEIR CHOICE to the authors within 14 -> days. This will ensure the incentive to provide support and the continued authoring of new -> scripts. -> If you think people should work for nothing and you cannot agree to abide promptly by this -> condition, we recommend that you decline the script. We'll understand. -> Gratuities cannot be accepted via any source other than PayPal. -> Please use the [Donate] button at www.scripterlative.com, stating the URL that uses the code. ---- These instructions may be removed but not the copyright indicator. SlideScroll - Buttons to scroll divs or frames at variable speed in any available direction. Optional support for scrolling div content using the scrollwheel when scrollbars are hidden. The default scrollwheel axis can be configured and is toggled by clicking the left button within the scrolled element. NOTE: This feature is not supported for frames. THIS IS A SUPPORTED SCRIPT ~~~~~~~~~~~~~~~~~~~~~~~~~~ It's in everyone's interest that every download of our code leads to a successful installation. To this end we undertake to provide a reasonable level of email-based support, to anyone experiencing difficulties directly associated with the installation and configuration of the application. Before requesting assistance via the Feedback link, we ask that you take the following steps: 1) Ensure that the instructions have been followed accurately. 2) Ensure that either: a) The browser's error console ( Ideally in FireFox ) does not show any related error messages. b) You notify us of any error messages that you cannot interpret. 3) Validate your document's markup at: http://validator.w3.org or any equivalent site. 4) Provide a URL to a test document that demonstrates the problem. Installation ~~~~~~~~~~~~ Save this file as 'slidescroll.js' in a suitable folder. (If slidescroll.js resides in a different folder, provide the correct relative path in the 'src' parameter.) Within the section place these tags: Configuration ~~~~~~~~~~~~~ It is recommended that the containing document uses a strict . See: http://validator.w3.org Create or design your 'button' elements. If they are to be images, they are easily created using any graphics program like MS Paint or GIMP. Note that button size has no effect on maximum scroll speed, however higher/wider buttons afford easier speed control. If you are using images as controls, assign them to suitably positioned placeholders in your document. Whatever type of control element you use, assign them all unique ID attributes. Positioning of elements is an HTML/CSS discipline, beyond the scope of these instructions. Anywhere in the document BELOW all the involved control elements and scrollable divs/iframes, insert the following tags, replacing the parameters with suitable values as shown in the examples. Meanings of Parameters ~~~~~~~~~~~~~~~~~~~~~~ buttonId - The ID of a scrolling button. elemId - Either the ID attribute of a corresponding div/iframe to be scrolled, or the NAME of a sibling frame (that is a frame in the same immediate frameset) that is to be scrolled. To scroll the current document using a fixed-position button, specify 'self'. options - A quoted string containing: a) The scroll direction specifier(s) for the button. Specify at least one and any combination of: [ LEFT RIGHT UP DOWN ALL ]. b) If adding scrollwheel support, specify the initial axis with MOUSEWHEELX or MOUSEWHEELY. In cases where more than one button acts on an element, this option should be specified for one button only. c) If adding scrollwheel support and only one axis will be scrollable, include NOTOGGLE. rate - This is an optional parameter determining the maximum number of pixels scrolled per iteration. For reference, the default value is 20. Usage Examples ~~~~~~~~~~~~~~ Configure a button with ID 'upDown' to scroll the content of
up and down at the default rate: Configure and to scroll
left and right respectively, at a maximum rate of 40 pixels per iteration. Additionally, configure the scrollwheel to scroll the contents horizontally by default and inhibit toggling of the scrollwheel axis: Configure to scroll