小编hee*_*ema的帖子

jQuery向导步骤在ajax调用完成之前移动

如何根据某些ajax调用的结果控制移动到下一步?data.d以bool值返回

$("#wizard").steps({
            onStepChanging: function (event, currentIndex, newIndex) {
                var move = false;
                if (currentIndex == 2) {
                    move = false;
                    $.ajax({
                        type: 'POST',
                        url: "Reservation.aspx/SomeFunction",
                        data: serializeData({  }),
                        contentType: "application/json",
                        dataType: 'json',
                        success: function (data) {
                            move = data.d;
                            return true;
                        },
                        error: ajaxLoadError
                    });
                }
                return move;
            },
            saveState: true

        });
Run Code Online (Sandbox Code Playgroud)

jquery jquery-steps

15
推荐指数
3
解决办法
1万
查看次数

标签 统计

jquery ×1

jquery-steps ×1