Hello. There is such an interesting site . It implemented most likely onepageScroll. When scrolling down the block opens but he has his url? how it is implemented

    1 answer 1

    The first line changes the url without reloading the page. The second one changes the title.

    window.history.pushState('state', 'title', '/new-url'); document.title = 'new title' 
    • Well, it's good to change, only if I pass for example directly from the links, then this particular block will open to me - duddeniska
    • @duddeniska $(document).ready find the link through window.location.href and jump to the desired anchor or show the desired content - dluhhbiu