我想将jquery-steps next 和previous 按钮放在#wizard 表示主div 之外。我想把它放在我的页面底部。我总是可以使用自定义按钮,然后在那里添加分页功能。
但是有什么简单的方法可以做到这一点吗?意味着我只是给 id 像下一个功能应该分配给这个 id 而以前的功能应该分配给这个 id?
如果有人对此有任何想法,并与我分享,那就太好了。
谢谢。
我想将jquery-steps next 和previous 按钮放在#wizard 表示主div 之外。我想把它放在我的页面底部。我总是可以使用自定义按钮,然后在那里添加分页功能。
但是有什么简单的方法可以做到这一点吗?意味着我只是给 id 像下一个功能应该分配给这个 id 而以前的功能应该分配给这个 id?
如果有人对此有任何想法,并与我分享,那就太好了。
谢谢。
我最终选择了按钮,然后向它添加了事件。只是很容易。
----------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>