I am using iScroll and have 3 pages, which I load by adding/removing .hidden class. When I scroll the content on the first page and then change view, I get the next view loaded scrolled and missing the content.
How can I make it scroll to the top of the scrollable div when clicked?
I am essentially using the following code to control the views. I have chosen to do it this way because loading separate pages loads in separate tabs and is slow.
function show_info_page(){
$('div.info_page').removeClass('hidden');
$('div.main_page').addClass('hidden');
$('div.stats_page').addClass('hidden');
$('div.contact_page').addClass('hidden');
$('div.info').addClass('active');
$('div.stats').removeClass('active');
$('div.contact').removeClass('active');}