Link to page coordinates
Is there a way to link to other page content using coordinates without using #anchors? For example, say that I want the link to go directly to content 1200 pixels down the page. How can i do this? Javascript, server-side magic, it all takes as long as it works for the average visitor.
+2
source to share
5 answers
Saving coordinates in a hash
eg. http://example.com/page#123
Then with javascript scroll the window
window.onload = function(){
var pos = window.location.hash.substring(1); //get hash & remove #
window.scroll(0,pos);
};
+1
source to share