ODDFUSE
ODDFUSE

Reputation: 89

Anchor link not working when clicked

Sooo.. I've got this navigation on the frontpage. I'm trying make it link to an anchor on another page.

www.oddfuse.com

This is the anchor link:

<a class="hover" title="Skills" href="/page#skills">

As you can see, it does not redirect to the specified page.

However it does work when typed directly into the address bar:

www.oddfuse.com/page#skills

This also works:

<a class="hover" title="Skills" href="/page">

But with the hash, I get no response whatsoever.

Any ideas on how I fix this?

Upvotes: 1

Views: 4703

Answers (3)

ODDFUSE
ODDFUSE

Reputation: 89

Okay, so it turned out that it was the jQuery Mobile somehow messing with the anchor tags.

I needed to put data-ajax="false" in the link, and it now works perfectly. TMYK.

Found the solution here

Upvotes: 3

mht
mht

Reputation: 80

If you want a link to jump a specific location on a different page, you'll need to replace #anchor with the full URL for the target page, similar to:

<a class="hover" title="Skills" href="http://oddfuse.com/page/#skills">

Upvotes: 0

Ryan D
Ryan D

Reputation: 1113

can you try including the file extension? i.e.

<a class="hover" title="Skills" href="/page.html#skills" />

I'm wondering if it thinks the # is part of a file name that can't be found.

Upvotes: 0

Related Questions