Skip to content Skip to sidebar Skip to footer

Chrome Bug Or Coding Error? Anchor/id Links Within Destination Page Not Working

EDITED TO ADD: Interestingly - based up people's comments below - I tried setting up a jump link WITHIN my main page - and that works just fine. (http://www.umbc.edu/classof2012/in

Solution 1:

Try this dirty hack,

var hash = location.hash;
location.hash = '';
location.hash = hash;

on window load or document.ready

Solution 2:

When the page loads, it looks like the lis are set to display: none, then changed to display: list-item via JavaScript. Most likely Chrome/IE are trying to jump to the block as soon as HTML is loaded, but the blocks haven't been displayed yet.

I'd guess that's your problem. That's an odd setup you have also, with the absolute positioned blocks (I think that's the wookmark plugin?) — it seems the same could be done with plain CSS without absolute positioning.

Solution 3:

This:

$( "[href^=#]" ).click(function() {
    location.hash = $(this).attr("href")
})

worked for me. As many others mentioned, it's a bug in Chrome.

Solution 4:

I think the destination code does not have the anchor

<aname="bioName">

Update

Well testing using IDs works as well, just not on your page. maybe it's the content

Post a Comment for "Chrome Bug Or Coding Error? Anchor/id Links Within Destination Page Not Working"