Coder Profile - Show off your skills, get a coder profile.
 
 
 
The Author
Knoxius
Benjamin Knox
Send A Message
Rating
Not
Rated
Please login to rate source codes.

Click here to register a free account with us.
General Details
JavaScript
Posted 3.11 Years Ago
424 Views
Received 0 Ratings
More Codes By This Author
Ensure String Escape
.htaccess Rewrites
clear_value();
Easy-to-Use Image Rollove...
PHP/MySql User System (Ba...

Easy-to-Use Image Rollover


Description
This is a very simple Javascript code for creating image rollover effects. A function is created in Javascript to carry out the command, and the rest is HTML.

The function is first called when the image is rolled over. The parameters of the function are the tags id and the new image to be used (in the JS, 'images/' is already specified as the image directory. Change/remove depending on your personal directory settings).

After the image is rolled over, the JS is called with the parameters. The first part will find the tag using the ID specified, and the second part will change the SRC of the image with the second parameter.

When rolling out of the image, the same function is called with the same ID, except this time we change the second parameter back to pic1 (or whatever). This will make the picture switch back to it's original state.

All you need to remember is to change around arguments and IDs for each image. You can also use 'innerHTML' rather than 'SRC' if you want, but you will have to make some changes to the code.
Source Code
Download Download Source Code
imagerollover.zip ( 0.00Mb )
NEVER open a .exe, .bat, .cmd, or other executable file since that is where viruses are likely to live. Please virus scan all files you download.
Comments
Please login to post comments.
Page 1 of 1
More "JavaScript" Source Codes By This Author
Recently Posted "JavaScript" Source Codes
Recently Rated "JavaScript" Source Codes
 
 
Latest News About Coder Profile
Coder Profile Poll
If you made money from keeping your profile up to date, say $30 and up, per month. What extra time would you spend on your profile?

No extra time
A few hours at weekends
A whole day each week
Every minute i can get free


please login to cast your vote
and see the results of this poll
Latest Coder Profile Changes
Coder Profile was last updated
3.20 Years Ago
Official Blog :: Make A Donation :: Credits :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents :: Wallpapers
Version 1.46.00
Copyright © 2007 - 2012, Scott Thompson, All Rights Reserved