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
https://forums.phpfreaks.com/topic/63683-onmouseover-help-d/
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
https://forums.phpfreaks.com/topic/63683-onmouseover-help-d/#findComment-317413
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
https://forums.phpfreaks.com/topic/63683-onmouseover-help-d/#findComment-319313
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.