Jump to content

onmouseover help :D


php?

Recommended Posts

href="?p=signup"onmouseover="image2.src='images/nav/2-on.gif';"onmouseout="image2.src='images/nav/2.gif';">

<img name="image2" src="images/nav/2.gif" border=0></a><br>

 

Mkay, so this changes the image to 2-on on mouse over... and then on mouse out it changes back to image 2. What im wondering is how would i make it do: on mouse over (more then 1 image) changes a different image on the page to another image, and then on mouse out of the other images changes the other image back. (If not image then table?)

Link to comment
Share on other sites

this should be done with css....

 

but as you want like a slide show of images you would need to pass a list of images to a function for that to change the image.

 

onmouseover="imgswitcher('img1','img2',....'imgn') // imgn should be the path to each image.

Link to comment
Share on other sites

<img src="mouse.gif" 
  onmouseover="document.getElementById('ImageToChange').src='images/nav/2-on.gif';" 
  onmouseout="document.getElementById('ImageToChange').src='images/nav/2.gif';"
><br />
...
<img src="images/nav/2.gif" id="ImageToChange">

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.