Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery Hover Problems in IE7

I have an image that, when hovered over, should display another image with 4 absolutely positioned links. This code works in Chrome, Firefox, Safari, and all versions of IE except IE7. Any help with IE 7?

Here's the JS Fiddle: http://jsfiddle.net/derekbrown/2qVK2/21/

Thanks in advance!

like image 625
Derek Brown Avatar asked Jul 18 '26 18:07

Derek Brown


1 Answers

The problem here is that the initial image is still taking up space on the page despite setting opacity to 0. This can be seen by editing the line which sets the image to opacity 0 to 1; when hovered both images will be shown side by side.

You need to somehow remove the initial image from the document flow on hover. This is normally done by setting the display property to none. I've updated the jsfiddle to show this in action but the animation is totally smooth. Ill edit my answer I can improve on its implementation

http://jsfiddle.net/2qVK2/19/

EDIT: This is better, sets the width, animation is much smoother.

http://jsfiddle.net/2qVK2/20/

like image 181
benni_mac_b Avatar answered Jul 20 '26 07:07

benni_mac_b



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!