This is different from existing queries here.
I am facing removing #url when destination id is in different page.
Here's what I've done : There are 2 HTML pages : index.html & about.html. I have shown various Menu information using <div id="one"></div>
in index.html page rather than separate page for every menu item, to remove #url when clicked I have tried the below lines separately.
history.pushState('', document.title, window.location.pathname);
var target = $(this.target);
However, #url is not showing only in index.html page. But, when clicked on menu items in about.html page the #url is still visible (because the <div id=""></div>
are in index.html). Can you help me to remove #url even the destination id is in different page.