2

我想将jquery-steps next 和previous 按钮放在#wizard 表示主div 之外。我想把它放在我的页面底部。我总是可以使用自定义按钮,然后在那里添加分页功能。

但是有什么简单的方法可以做到这一点吗?意味着我只是给 id 像下一个功能应该分配给这个 id 而以前的功能应该分配给这个 id?

如果有人对此有任何想法,并与我分享,那就太好了。

谢谢。

4

2 回答 2

3

我最终选择了按钮,然后向它添加了事件。只是很容易。

    ----------events----------------
    'click #reportConfigStepsPrev':function(){
            $("#wizard").steps('previous');
          },
          'click #reportConfigStepsNext':function(){
            $("#wizard").steps('next');
          },
    ------------------------------------------------
    onStepChanged: function(event,  currentIndex, newIndex)
              {
                if(currentIndex == 0)
                {
                  $("#reportConfigStepsPrev").addClass("btn-default");
                  $("#reportConfigStepsPrev").removeClass("btn-primary");
                }
                else
                  $("#reportConfigStepsPrev").addClass("btn-primary");
                if(currentIndex == ($(".steps li").length - 1))
                {

                    $("#reportConfigStepsNext").addClass("btn-default");
                    $("#reportConfigStepsNext").removeClass("btn-primary");
                }
                else
                  $("#reportConfigStepsNext").addClass("btn-primary");

              },

-----------------html----------------------------
  <button type="button" id="reportConfigStepsPrev" class="rbtn btn-sm btn-default"><i class="fa fa-chevron-left"></i></button>
  <button type="button" id="reportConfigStepsNext" class="reportConfigNevigation btn btn-sm btn-primary"><i class="fa fa-chevron-right"></i></button>
于 2014-04-16T19:24:25.687 回答
0

只需添加这一行:

$("div.actions").insertBefore("div.content");

这里的文档

于 2020-04-27T18:36:09.953 回答