Tutorial: Hyperlink to an anchor on another page that has dynamic content.

Problem: Modern sites are now created with dynamic content. Often times the content pushes and moves other content around. Often in many browsers, if a URL targets an anchor on another, the browser will jump to the targeted anchor before the page is fully loaded. However, once the page is loaded, the positioning of the anchor has changed and the browser will jump to the bottom of the page.

Solution: Once the document is ready, and the content is loaded, use jQuery to make sure the browser is positioned at the anchor.

That’s it!

Posted in HTML, JavaScript, jQuery Tagged with: , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*