I am working on a dynamic tooltip…I’m stuck on how I can get the bottom position of #MyAuction-BidHistory to appear just above my link a.my-auction-history?
Here is my code so far:
var linkOffset = $('a.my-auction-history').offset().top;
$('.my-auction-history').mouseover(function(e){
$.get('/auction/includes/new-bidhistory.asp?lplateid=' + pListedPlatesId + "&xx=" + t, function(data){
$('#MyAuction-BidHistory').css({'display':'block', 'opacity':'0', 'top':linkOffset }).animate({opacity:1}, 200).html(data);
});
});
I only need to work out the Y co-ordinates as #MyAuction-BidHistory has been position:absolute; & has margin-left:300px;
Any help is greatly appreciated, Thanks
Have you tried
$('a.my-auction-history').offset().top? It should give you the position of the<a>element relative to the parent box, i.e. the ancestor element withposition: absolute|relative|fixed, or simply the<body>.