多步骤单击下一步,滚动到顶部而不是保持在底部

时间:2013-06-07 11:14:58

标签: jquery forms

我有一个进入下一步的表单,但是当它继续下去时它停留在底部而不是顶部。

我该怎么做?我正在使用更新的Jankos Form to Wizard插件(http://www.style-card.co.uk/id/assets/js/formToWizard.js

JSFiddle here - http://jsfiddle.net/4Hkxy/9/

       $(function(){
            var $signupForm = $( '#multipage' );
 $signupForm.formToWizard({
                submitButton: 'SaveAccount',
                showProgress: true, //default value for showProgress is also true
                nextBtnName: 'Forward >>',
                prevBtnName: '<< Previous',
                showStepNo: false,
                validateBeforeNext: function() {
                    var selectedCount = $('.thumbnails.image_picker_selector:visible .selected').length;
    var totalCount = $('.thumbnails.image_picker_selector:visible').length;

    if(selectedCount != totalCount) {
        alert('please select an image per selection');
    return false;
}
return true;
                }
            });
       });

$("select.image-picker").imagepicker({
    hide_select: true,
    show_label: true,
});
$("select.image-picker.show-labels").imagepicker({
    hide_select: true,
    show_label: true,
});

var container = $("select.image-picker.masonry").next("ul.thumbnails");
container.imagesLoaded(function () {
    container.masonry({
        itemSelector: "li",
    });
});

0 个答案:

没有答案
相关问题