Basically I'm trying to write a jquery function to fadeIn and fadeOut a hidden div.
The idea is to hover over a link and trigger a div to fadeIn and obviously fadeOut on mouseout.
My problem is that I want to use this as a tooltip for many different links and each link would display a different message.
Said that, the function should retrieve the value of "id" of the link that it's being hovered over and pass it to the hidden div so it could be fadedIn and fadedOut.
Please see the HTML
<div class="case_info"> <a href="#" id="one">1</a> <div class="hidden">this is hidden text this is hidden text</div> </div>
Now the Jquery function (at least what I've got so far).
$(document).ready(function()
{
$("a").hover(function()
{
var grab = $("a").attr("id");
console.log(grab);
$(".hidden").fadeIn("slow");
},
$(".hidden").fadeOut("slow");
);
});
I hope I was able to explain myself here.
Thanks to anyone that can help.
Juan Carlos

New Topic/Question
Reply



MultiQuote


|