Log in

View Full Version : Fade in/out div by hovering over another div



Beverleyh
12-11-2008, 06:06 PM
Hi,

I've been looking for a script which does the following:

Mouseover div A and fade div B into view,
Mouseleave div A and fade div B out of view.
(div B should always be in view as long as the cursor is over div A - as soon as it moves away, div B should disappear.)

I've found something close here: http://jemthingsandstuff.co.uk/testing/hover-fade.html but its a little messy and if you move around too quickly, you get errors and sometimes the visibility flips so when the mouse is over div A, div B is hidden instead of being visible.

I'd like something really clean that doesnt mess-up no matter how fast someone moves the cursor around (if thats possible).

If anyone has a suitable script, can they please let me know.

thanks

Beverley

Medyman
12-11-2008, 11:03 PM
Look into jQuery.

Snookerman
12-11-2008, 11:14 PM
I think jQuery (http://jquery.com/) would be quite useful for you.

Busy thread, I'll leave my post in case you want the link

Beverleyh
12-12-2008, 10:18 AM
Woo-hoo

I cant believe how easy it was - thanks for pointing me in the direction of jQuery guys.
This does exactly what I wanted: http://www.jemthingsandstuff.co.uk/testing/hover-fade2.html

For other jQuery beginners I really recommend the following video as a starting point: http://blog.themeforest.net/tutorials/jquery-for-absolute-beginners-video-series/
From there you can subscribe to the RSS feed or search on "jQuery for Absolute Beginners" to find the other vids in the series (they're currently on vid 9)

Thanks again chaps

songchai
12-13-2008, 01:58 PM
Oh Great, Just looked through http://jquery.com/,

Thank you indeed too.