I'm working with jQuery hashchange event, and every button in my page uses this code like a link to another page:
window.location.hash = '#anotherpage';
When I need to go back to the homepage, location.hash leaves the hash character (#) in my URL, even with location.hash = null or location.hash = ""
Does anyone here know how can I remove the hash in this case?
EDIT:
As Dsafds and Daniel said, only go back to my home page can be easy if I use window.location.hash = "#". The problem is the character (#) in the home page link, used for the other pages, like #contact, is normal, but my home page have the hash too (site.com/#). I need to remove it. Any other idea? Thanks!