如何在没有“删除”和“添加”步骤的情况下动态更改/更新“jQuery步骤”中的标题?
哇,downvoters,如果你想看代码,请看我的回答。这个问题对我来说很有意义,我也想到其他Google员工。答案 0 :(得分:1)
发现自己,请参阅onStepChanged:
$("#wizard").steps({
autoFocus: true,
bodyTag: "section",
headerTag: "h6",
labels:
{
current: "current step:",
pagination: "Pagination",
finish: "Ende",
next: "Vor",
previous: "Zurueck",
loading: "Lade es..."
},
onStepChanging: function (event, currentIndex, newIndex)
{
},
onStepChanged: function (event, currentIndex, priorIndex)
{
obj = $("#wizard-t-" + currentIndex);
title_ = "ABC";
html_zaehler = obj.html()
html_zaehler = html_zaehler.split(".</span>")[0] + ".</span>";
obj.html(html_zaehler + " " + title_);
},
transitionEffect: "slideLeft"
});