Home > Mobile >  Navigating around website adds a [object object] to URL after clicking around anchors
Navigating around website adds a [object object] to URL after clicking around anchors

Time:04-07

Thanks for reading. I just wanted to know why i get a "/index.html#[object Object]" at the end of URL when clicking around anchors on a single page website.

I would also like to know if i can remove it if it isn't too game changing with htaccess or resolve the issue that is occuring?

If you require more information that isn't in this help request feel free to ask :) !

The website enter image description here

window.location.hash = target;

target is not the selector, is a jquery element, so it's an object.

Change it for this one:

window.location.hash = target.selector;

I think that's what you want

  • Related