remove the #anchor-id when scrolling

前端 未结 2 1510
一向
一向 2021-01-24 11:58

I\'m using this jquery http://css-tricks.com/examples/SmoothPageScroll/ to create a smooth page scroll, however each time I click a scrollable element, the anchor ID appears on

2条回答
  •  深忆病人
    2021-01-24 12:31

    The example explicitly adds the tag to the url:

    // Set hash in URL after animation successful
    location.hash = target;
    

    You should be able to remove/comment this line.

提交回复
热议问题