I have three divs like
<div id="top" style="display:hide"></div>
<div id="middle" style="display:block"></div>
<div id="bottom" style="display:hide"></div>
They all are behave like pages and having similar height for example 700px. Initially only middle div (homepage) should be displayed. When I click on a link in middle div for example , middle div will be hidden and top div should be displayed and page should scroll that div. Similarly when another link in middle div , again middle div should be hidden and bottom div displayed and scrolling should be to the bottom this time.
I have used jquery scrollTo function but scrolling is happening after the div is displayed, not at the same time. I am using below code on link click
$('#top').css('display', 'block');
$('#top').ScrollTo();
Any help?