trying to fade out a top div on hover to reveal working links in text below using JQuery
- by Heath
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