我正在尝试在多个导航选项卡中的每一个中使用一个向导,但是当我切换选项卡时,向导中当前步骤的内容会丢失。
代码如下和 JSFiddle这里
<ul class="nav nav-tabs" id="idcnavtabs1">
<li><a href="#home1" data-toggle="tab">Home</a></li>
<li><a href="#train1" data-toggle="tab">Train</a></li>
<li><a href="#recognise1" data-toggle="tab">Recognise</a></li>
<li><a href="#manage1" data-toggle="tab">Manage</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="home1">
<div class="fuelux">
<div id="homewizard" class="wizard">
<ul class="steps">
<li data-target="#home1step1" class="active"><span class="badge badge-info">1</span>Step 1<span class="chevron"></span></li>
</ul>
<div class="actions">
<button type="button" class="btn btn-mini btn-prev"> <i class="icon-arrow-left"></i>Prev</button>
<button type="button" class="btn btn-mini btn-next" data-last="Finish">Next<i class="icon-arrow-right"></i></button>
</div>
</div>
<div class="step-content" id="homestepcontent">
<div class="step-pane active" id="home1step1">This is step 1</div>
</div>
</div>
</div>
<div class="tab-pane" id="train1">
<div class="fuelux">
<div id="trainwizard" class="wizard">
<ul class="steps">
<li data-target="#train1step1" class="active"><span class="badge badge-info">1</span>Step 1<span class="chevron"></span></li>
<li data-target="#train1step2"><span class="badge badge-info">1</span>Step 2<span class="chevron"></span></li>
</ul>
<div class="actions">
<button type="button" class="btn btn-mini btn-prev"> <i class="icon-arrow-left"></i>Prev</button>
<button type="button" class="btn btn-mini btn-next" data-last="Finish">Next<i class="icon-arrow-right"></i></button>
</div>
</div>
<div class="step-content" id="trainstepcontent">
<div class="step-pane active" id="train1step1">This is step 1</div>
<div class="step-pane" id="train1step2">This is step 2</div>
</div>
</div>
</div>
<div class="tab-pane" id="recognise1">
<div class="fuelux">
<div id="recognisewizard" class="wizard">
<ul class="steps">
<li data-target="#recognise1step1" class="active"><span class="badge badge-info">1</span>Step 1<span class="chevron"></span></li>
<li data-target="#recognise1step2"><span class="badge badge-info">2</span>Step 2<span class="chevron"></span></li>
<li data-target="#recognise1step3"><span class="badge badge-info">3</span>Step 3<span class="chevron"></span></li>
</ul>
<div class="actions">
<button type="button" class="btn btn-mini btn-prev"> <i class="icon-arrow-left"></i>Prev</button>
<button type="button" class="btn btn-mini btn-next" data-last="Finish">Next<i class="icon-arrow-right"></i></button>
</div>
</div>
<div class="step-content" id="recognisestepcontent">
<div class="step-pane active" id="recognise1step1">This is step 1</div>
<div class="step-pane" id="recognise1step2">This is step 2</div>
<div class="step-pane" id="recognise1step3">This is step 3</div>
</div>
</div>
</div>
<div class="tab-pane" id="manage1">
<div class="fuelux">
<div id="managewizard" class="wizard">
<ul class="steps">
<li data-target="#manage1step1" class="active"><span class="badge badge-info">1</span>Step 1<span class="chevron"></span></li>
<li data-target="#manage1step2"><span class="badge badge-info">2</span>Step 2<span class="chevron"></span></li>
</ul>
<div class="actions">
<button type="button" class="btn btn-mini btn-prev"> <i class="icon-arrow-left"></i>Prev</button>
<button type="button" class="btn btn-mini btn-next" data-last="Finish">Next<i class="icon-arrow-right"></i></button>
</div>
</div>
<div class="step-content" id="managestepcontent">
<div class="step-pane active" id="manage1step1">This is step 1</div>
<div class="step-pane" id="manage1step2">This is step 2</div>
</div>
</div>
</div>
</div>