Figured this needed a better explanation:
I have a navigation with some links:
<a id="home" href="/">Home</a>
<a id="screenshots" class="scroll_to_screenshots" href="#">Screenshots</a>
<a id="ask" class="scroll_to_container" href="/ask">Support</a>
And I have a js file with the following:
$(document).ready(function() {
$(".scroll_to_screenshots").click(function() {$.scrollTo($("#screenshots").position().top+10, 300)});
$(".scroll_to_container").click(function() {$.scrollTo($("#container").position().top-10, 300)});
});
Now for the screenshots it works fine: it scrolls down to the screenshots id. However the second one needs to load a page first, then scroll. Obviously that does not work (it scrolls down briefly and then the page loading kicks in. Can I change that action to -load page first, -scroll down?
And then obviously I have another problem, when I am on .../ask the first link doesn't work anymore.