Reputation: 121
Information:
Self Hosted WordPress Site
Testing on local host using Uniserver as well as the Test site and pre-production site hosted on the company's local servers rather than FTP.
Issue
Anchor Link Code:
<a id="anchorlink1"></a>
<a href="http://fullurlhere/nbs-test-panel-of-diseases-2#anchorlink1">link text</a>
I also tried:
<a name="anchorlink1"></a>
<a href="http://fullurlhere/nbs-test-panel-of-diseases-2#anchorlink1">link text</a>
And:
<a name="anchorlink1"></a>
<a href="/nbs-test-panel-of-diseases-2#anchorlink1">link text</a>
And
<a name="anchorlink1"></a>
<a href="http://fullurlhere/nbs-test-panel-of-diseases-2/#anchorlink1">link text</a>
Result: When a user clicks the link to the Anchor Link on a different page, the address bar will display the full url with the Anchor Link for a second then the Anchor Link will be removed and only the root URL to the page will be displayed.
Example: Displays for a second:
http://fullurlhere/nbs-test-panel-of-diseases-2#anchorlink1
Then it will revert to this:
http://fullurlhere/nbs-test-panel-of-diseases-2
Troubleshooting: I have done the following trouble shooting all with no effect:
It appears that this issue only happens when I link to the Anchor Tag from a different page.
I have narrowed down the issue to the jquery.jstree.js file.
Not sure how to fix it...
Any help would be greatly appreciated.
Upvotes: 6
Views: 9366
Reputation: 27385
Answer taken from the question
JHP 11/7/13
We discovered that the issue was a specific code in the js file. There were six instances in it and once we removed them everything worked fine..replace(/^#/,"")
Upvotes: 0
Reputation: 323
Try adding the following:
<a name="anchorlink1"></a>
<a id="anchorlink1" href="http://fullurlhere/nbs-test-panel-of-diseases-2#anchorlink1">link text</a>
Upvotes: 0