Can someone please help? I'm new to jquery and I'm stuck on something that seems too simple. Sorry if this is a repost but I couldn't find what I was looking for.
I have 2 links on a page and as you hover over one of the links, you show a corresponding div next to the link. Like a dialog popup. Heres what I have, please let me know what I'm doing wrong..
js code:
function Show(id)
{
var pos = $("a#88" + id).offset();
var eWidth = $("a#88" + id).outerWidth();
var mWidth = $("div#99" + id).outerWidth();
var left = (pos.left + eWidth - mWidth) + "px";
var top = pos.top + "px";
//alert(left + ' ' + top);
$('div#99'+id).css("top", top);
$('div#99'+id).css("left", left);
$('div#99'+id).css("position", "fixed");
$('a:Tip').hover(
function($e) { $('div#99'+id).slideDown(500); },
//function($e) { },
function($e) { $('div#99'+id).slideUp(500); }
);
}
html code:
<a href="#" id="88123456" class="Tip" onmouseover="Show(123456);">Some Title Text</a>
<br />
<br />
<br />
<br />
<br />
<br />
<a href="#" id="88456789" class="Tip" onmouseover="Show(456789);">Some Title Text2</a>
<br />
<div id='99123456' title="hello" style="display:none;">
something here;99123456
</div>
<div id='99456789' title="hello" style="display:none;">
something here;99456789
</div>
Thanks