Jump to content

Change 2 pictures on 1 mouseover


umekille78

Recommended Posts

Hi!Is it possible to change 2 pictures on one "oneMouseOver"??

onMouseOver="document.images[0].src='A.jpg';"onMouseOver="document.images[1].src='B.jpg';"

I thought of using a function:

function SecA(){  document.images[0].src="A.jpg";  document.images[1].src="B.jpg";}onMouseOver="SecA();"

But I dont get that to work. Does anyone have some ideas that can help me?/Per

Link to comment
Share on other sites

you had just about everything<img src="images/dir_277.gif" id="i1" onmouseover="SecA()"/><img src="images/dir_835.gif" id="i2" onmouseover="SecA()"/><script>function SecA(){ document.images[0].src="images/dir_997.gif"; document.images[1].src="images/dir_837.gif";}</script>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...