开发者

Remove hash from url

开发者 https://www.devze.com 2023-02-13 18:19 出处:网络
I\'m using this example http://demos.flesler.com/jquery/scrollTo/. I\'ve managed to implement it but when my page is scrolling to a particular div the id of my div is added to the url i.e http://www.e

I'm using this example http://demos.flesler.com/jquery/scrollTo/. I've managed to implement it but when my page is scrolling to a particular div the id of my div is added to the url i.e http://www.example开发者_Python百科.com/#footer. This thing does not happen in the demo page. What have i missed?


you need to run the preventDefault() to stop the browser following the link at the end of your javascript:

http://api.jquery.com/event.preventDefault/

0

精彩评论

暂无评论...
验证码 换一张
取 消