469,273 Members | 1,765 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,273 developers. It's quick & easy.

onmouseover change css class

133 100+
Hi,

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:

[HTML]
<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';"/>
</div>
</div>
[/HTML]

But this does not work, any ideas?

Cheers,
Adam
Aug 26 '08 #1
1 1731
gits
5,390 Expert Mod 4TB
try:

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
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.