471,893 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,893 software developers and data experts.

onmouseover change css class

133 100+

What i want to do is when i mouseover an image it changes the class of a div that is somewhere on the page.

I thought i could do this by doing:

<div class="header_image2" name="remote" id="remote">
<div id="header_image2_inner">
<img src="images/composite-decking-sm.JPG" height="75" hspace="2" border="0" onmouseover="remote.className = 'composite1';" onmouseout="remote.className = 'header_image2';"/>

But this does not work, any ideas?

Aug 26 '08 #1
1 1777
5,390 Expert Mod 4TB

Expand|Select|Wrap|Line Numbers
  1. onmouseover="document.getElementById('remote').className = 'composite1';"
kind regards
Aug 26 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Richard | last post: by
12 posts views Thread by Epetruk | last post: by
5 posts views Thread by Martin Chen | last post: by
3 posts views Thread by drjackk | last post: by
2 posts views Thread by Justin Rowe | last post: by
3 posts views Thread by Vear | last post: by
3 posts views Thread by =?Utf-8?B?RGVlcGE=?= | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.