Link to home
Start Free TrialLog in
Avatar of jameshuckabone
jameshuckabone

asked on

JavaScript Question

I am making a strip of boxes (divs) that go across the entire width of the browser window.   I'd like to apply styles to several elements in each div as soon as the user mouses over any part of the box.  My test page is located at: http://newspainwines.com/test/

Can someone get me started using the current styles/structure of my test page?

So I imagine the JavaScript looking like:

if ((hovered over any of the elements in the box) element 1 || element 2 || element 3 || element 4){
element 1.backgroundcolor = #333333 && element 2.color = #ffffff, etc.
}

Thank you!!

Avatar of Sudaraka Wijesinghe
Sudaraka Wijesinghe
Flag of Sri Lanka image

If it's only changing colors you need, I suggest you implement it only with CSS using :hover psudo style.

And, if you need to do more you can use jQuery to get more flexibility and effects.
http://docs.jquery.com/UI/Effects
Avatar of jameshuckabone
jameshuckabone

ASKER

I've tried that already, as you may be able to see.  But I'd like to mimic the effect of http://bigyouth.fr/#/Reference/ and it seems to be impossible with just css.  I thought that a little JavaScript could change the div border, background-color, text color, as well as invert the smaller button to it's over state, no matter where the mouse was situated within the box.
ASKER CERTIFIED SOLUTION
Avatar of Sudaraka Wijesinghe
Sudaraka Wijesinghe
Flag of Sri Lanka image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you so much for the great starting point!!!
Glad to help. Thanks for the points.