anchor jumping by using javascript
You can get the coordinate of the target element and set the scroll position to it. But this is so complicated. Here is a lazier way to do that: function jump(h){ var url = location.href; //Save down the URL without hash. location.href = “#”+h; //Go to the target element. history.replaceState(null,null,url); //Don’t like hashes. Changing it … Read more