I'm testing the jquery-steps plugin, and if I click on the Next or Previous button (on the bottom) and the window top is below the steps' div top (i.e. this happens if my browser window is just too short in height), the scroll jumps to the body top.
Apparently there's no way to prevent this, I tried everything including editing the plugin code. The only thing I could do was setting a different scroll position by adding some code to the onStepChanging
event:
$("#steps-container").steps({
/* ... */
onStepChanging: function(event, currentIndex, priorIndex)
{
var top = 300;
var pos = $(window).scrollTop();
if (pos > top + 48)
{
$('body').scrollTop(top);
}
return true;
},
labels:
{
/* ... */
},
onFinishing: function (event, currentIndex) { submitOrderForm(); return true; }
});
Can somebody help me sorting this out? Thanks!