Picture Change
Hi I need a JavaScipt code that must work! This is the following.
When someone see the image when mouse is over it, the image changes. When not changes back to an orginal. Please Thanks! :D |
I'm pretty sure you can do this with CSS using back ground images. I'll read more on it, and hopefuly later I can display a lil code snippet for you to use. JS will mean less can see the rollover. (not a lot less, but still less.)
|
Okay, seeings how I assume this is a image link let's get down to buisness
the CSS code: Code:
a { Code:
<a href="index.php">Home</a> |
I think CSS is bad. So I want it to be actionscipt.
|
Not meaning to be rude in any way, but why on earth do you think CSS is bad? Do you mean for this particular situation?
|
No no, I like CSS. I use it only for text effects. Nevermind I wrote my own code. Thanks anyway!
|
:gj: I was about to try to dig up a JS code snippet for ya, but you wrote your own code. gj.
|
I use the following code which requires no preloading and works like a charm.
For future reference this is the javascript you need: 1) Put this in the head Code:
<script language="JavaScript" type="text/javascript" src="PATH/FILENAME.js"></script> (Make sure you set the filename in the first code) Code:
if (document.images) { Code:
<a href="index.php" target="_parent" onmouseover="changeimages('image2', 'image2on')" onmouseout="changeimages('image2', 'image2off')"> Code:
name="image1" There you go :D |
Oh mines much shorter!
|
Did you write it, or someone else? (@ webviper)
|
Well, yours may be shorter but i guarentee mine looks neater within the code ;).
|
Quote:
|
Quote:
Code:
<script type="text/javascript"> <img src="images/menu_buttons/forums_0.gif" width="170" height="19" border="0" hsrc="images/menu_buttons/forums_1.gif"> |
All times are GMT -5. The time now is 09:29 AM. |
Powered by vBulletin®