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.
Try it in the $(window).load
event instead of $(document).ready
.
I had the same problem and could fix it with that trick!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With