jQuery Offset wrong on refresh of page

Viewed 3102

I'm using jQuery offset function to place an absolutely positioned DIV over an anchor element.

$("#marker1").offset({ top: $("#<%= hypHowItWorks.ClientID %>").offset().top, left: $("#<%= hypHowItWorks.ClientID %>").offset().left });
$("#marker1").width( $("#<%= hypHowItWorks.ClientID %>").outerWidth() );

When the page loads up this works fine, however, if I reload the page by hitting F5, it displays the DIV slightly offset from where it shoud be. If I then go page back-forward in the browser its in the right place again!!

This is an issue with latest Chrome and Firefox, but not with IE9.

Any ideas?

Chris.

1 Answers
Related