Jump to content

JS: Catch browsers #anchor jumps on load, before they scroll to position


Recommended Posts

Posted

When I load a site per link with URL & anchor (https://www.example.com/#anchor), is it possible to catch / prevent the native jump and instead delegate this to an own javascript?

I found many resources about smoothscrolling within a doc, but I need to know if there is an event that can be catched, before a browser does a native anchor jump. :)

 

Posted
27 minutes ago, dragan said:

You could try one of the suggestions from here.

This looks good! Will try it in the afternoon. Many thanks. ?

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...