0

我想使用 jQuery-steps 开始一个 Steps 表单,但开头没有完成按钮。

因为我需要处理一些其他按钮和 jQuery 事件来激活(显示)或停用此按钮;但我没有找到如何在初始化后更改这些设置。

我试过这个:

function finish() {
  $("#wizard-2").steps({enableFinishButton: true });
}

但没有成功 - 有没有办法在步骤表单准备好并工作后更改这些设置(此示例为 enableFinishButton)?

4

1 回答 1

0

I don't know the correct way but a hack I'm using is:

$('a[href="#finish"]').addClass('disabled');

No where can I find an API method to change an existing setting, though there must be a way.

Update:

I have switched to hiding the finish button entirely via the following code:

$('a[href="#finish"]').css('display', 'none');

My last wizard step calls a web api method so I make sure to show the finish button in the beforeSend function of the Ajax call, then set it to display: none if the data warrants it.

于 2014-09-26T13:55:53.680 回答