New on DHTMLGoodies.com:
DHTML Chess is now available for WordPress at WordPressChess.com.
Download Scrollable div
Remember a strict doctype
A strict doctype is your biggest ensurance for this script to look and work the same across different browsers
Put this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
at the top of your HTML file
Put this into your <HEAD> section
Put this into your <BODY> section
Copy these two images into a folder called "images"
Right click on the arrows and choose "Save target As". If you want to, you could replace these two images with your own version
Implementation
Content
Put the content you want to scroll right below the line <!-- PUT YOUR HTML CONTENT IN HERE --> in the code
Javascript configuration
Use these javascript methods to configure the script:
- scrolldiv_setColor(rgbColor) - Specify a new border color
- setSliderBgColor(rgbColor) - Specify a background color for the scrollbar
- setContentBgColor(rgbColor) - Specify a background color for the scrolling content
- setScrollButtonSpeed(newSpeed) - Increase the scrolling speed(Default = 1)
- setScrollTimer(newInterval) - Lower value = faster scrolling(Default = 10)
- scrolldiv_setWidth(newWidth) - Specify a new width
- scrolldiv_setHeight(newHeight) - Specify a new height
- scrolldiv_initScroll() - Initializing the scrolling div. The functions above are optional, this one is needed for the script to work
For further information, see how these functions are used in the code.
No one has commented this - be first!
Post your comment
Comment preview: