This is probably an easy question and I am sure I am missing something here.
All I am trying to do is disable hash tag linking in the URL. For example, if someone were to enter the url: www.example.com/#anchor
it would change to www.example.com
and get rid of the hash completely in the URL.
I even wouldn't mind just disable the feature and keeping it in the URL, either way.
Here is what I have so far, but I am not having much luck:
var locationHashIndex = window.location.href.lastIndexOf("#"),
station = window.location.href.slice(locationHashIndex + 1);
window.location.href = window.location.href.substr(0, locationHashIndex);
This keeps reloading the page all crazy... Not what I am looking for. Any thoughts on this one?