On 1/9/07, The Manhatten Project
<teammacromedia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> I have an issue where I may have say 5 divs on a page and when I roll
> over an object on the page - not necessarily the div itself that I need
> to be able to highlight another DIV (using the neat border trick shown
> to me).
>
> So, if I roll over DIV 1, I want to be able to highlight DIV3 and DIV4
> (though I may want to be able to highlight the current div as well). Is
> there a way to bind events on an onMouseOver which basically says if
> you roll over me, highlight the following DIVs by ID...?
Perhaps you want something like this? Of course you could dress this
up to be very fancy with functions and changing class names instead of
directly manipulating styles.
<div id="one"
onmouseover="document.getElementById(''two'').style.border=''1px
solid red'';"
onmouseout="document.getElementById(''two'').style.border=''0'';">one</div>
<div id="two"
onmouseover="document.getElementById(''one'').style.border=''1px
solid red'';"
onmouseout="document.getElementById(''one'').style.border=''0'';">two</div>
Peter
--
JavaScript for Rails: http://forkjavascript.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---