We are experiencing an issue where, during the one page checkout process, the next step is not automatically scrolling to the top of the page when it loads.
After a user fills out all their billing information and clicks continue, the next step appears halfway down the page, based on the previous step's scroll position.
I would like each step in the one page checkout to always begin at the top of the page.
Currently, this portion of code exists within opcheckout.js:
gotoSection: function(section)
{
var sectionElement = $('opc-'+section);
sectionElement.addClassName('allow');
this.accordion.openSection('opc-'+section);
this.reloadProgressBlock(section);
jQuery("html, body").delay(10).animate({scrollTop: jQuery("#opc-"+section).offset().top }, 500);
},
However, this solution doesn't work well with our fixed header.
Does anyone know how I can modify this code to ensure it scrolls to the absolute top of the page?