Smooth Image Buttons
General
With this script your buttons can have up to four states: none, over, down, and up. This makes the button feel more real than a simple mouseover. In addition, the different button states are all part of the same background image.
Four different colors of test buttons.?
Did you say toolbar?
Notes
- Created by: Eric Simmons
- Web Site: http://www.jswitch.com
- The
divwidth properties must be set inline (within thedivtag not the CSS file). - The button
divelements must have bothnameandID= "jsimgbutton".
Source Code
Paste this source code into the designated areas.
External file
Paste this code into an external JavaScript file named: ImgButtons.js
Head
Paste this code into the HEAD section of your HTML document.
Body
Paste this code into the BODY section of your HTML document


Leave a Response
(3 comments)This does not work in Opera. [p]Thanks, [br /]Susan
The source code for ImgButtons.js has some extra text not properly surrounded with comment tags.[p]Otherwise - excellent!
Now this is a cool and intelligent concept (much like the old mipmapping of video game textures)! No more messy image preloads or tons of button-state images on your server (and only one image file to maintain/upload). Great contribution!!!