Animated scroll to an anchor after an external link is clicked, is this possible?
I'm not sure开发者_开发问答 if this is possible, but I want to be able to click an external link with an anchor #anchor and have it animate scroll to that anchor tag after loading the page. Any help on this would be much appreciated.
<a href="http://foo.com/work/#foo>Anchor Tag</a>
This would take you to foo.com/work and then animate you down to the #foo anchor tag.
No, this can't be done. The external page will have to implement the scrolling itself.
Even loading the external page in the frameset, and manipulating it after loading the link won't work because you can't access external document due to the Same Origin Policy.
精彩评论