Uncle Jim's Web Designs
Scrollable Div Areas By: Shinichi Hagiwara
To create a scrollable div like this:
- Include the dependant js files.
- The code in the init function needs to be executed in the onload event of the document. You may also Customize the slider to you needs. For more information about
the slider go to the slider page.
- Create a div in a div, just like the ones with ID's "divContainer_1" and "divContent_1" in this document.
These ID's need to be used in the init() method.
The outer container div needs to be relative. Give it a width, and if possible a height also.
In this example we use a height of "100%". That works together with the min-height and max-height. If you can, set a height in pixels directly.
The inner content div needs to be positioned absolute (in the container div).
- Make a div with an ID for the slider, here it is the "sliderDiv". This ID needs to be used in the setSliderObject() method.
- You can customize the scroll speed by changing the slider values for minVal, maxVal, valueInterval and arrowAmount.
It is a good idea to leave minVal 0 and maxVal 100. Then change the value of arrowAmount, but make sure it is not smaller than valueInterval.
|This is where your DIV title goes. |