trying to fade out a top div on hover to reveal working links in text below using JQuery

Posted by Heath on Stack Overflow See other posts from Stack Overflow or by Heath
Published on 2010-05-04T18:19:34Z Indexed on 2010/05/04 18:28 UTC
Read the original article Hit count: 346

Filed under:
|
|
|
|

I need to fade a div (and image) to reveal a div underneath (text with clickable links) using jQuery.

<script>
$(document).ready(function(){
$("img.a").hover(
function() {
$(this).stop().animate({"opacity": "0"}, "slow");
},
function() {
$(this).stop().animate({"opacity": "1"}, "slow");
});

});
</script>

Used the above code and all worked well, until I went to click the links. Seems the top hidden div is preventing me from doing so.

Tried the replaceWith function and that allowed me to click the links too - but couldn't get it to go back to showing original div when I moused out. Also, bossman wants the transition to be gradual - like a fade...

Any suggestions?

Many thanks!

Heath

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about fadeout