I'm dynamically creating anchors with JavaScript after initial page load and my solution to redirecting to the anchor is calling:
location.hash = window.location.hash;
This works great and as intended in firefox, it jumps straight to the anchor without reloading the page. However when testing in chrome, this simply doesn't work. I've tried the typical approaches I use to get something to work in chrome such as, wrapping it in a timeout, using href instead of hash, and even using hash.substr(1) to try and get chrome to play ball.
I'm at a lost, any tips?
Aucun commentaire:
Enregistrer un commentaire