i have a problem in a one page scrolling template that used a plagin (smoothscroll.js) i try to remove hash from url after user click on link but unfortunatly i cant do it.for example
http://localhost/template/#section2
how can i remove #section2 form the url
here is the code
var linkHandler = function(ev) {
ev.preventDefault();
if (location.hash !== this.hash) window.history.pushState(null, null, this.hash);
// using the history api to solve issue #1 - back doesn't work
// most browser don't update :target when the history api is used:
// THIS IS A BUG FROM THE BROWSERS.
// change the scrolling duration in this call
smoothScroll(document.getElementById(this.hash.substring(1)), 1000, function(el) {
location.replace('#' + el.id);
// this will cause the :target to be activated.
});
}