I'm trying to do a check with a Bootstrap Wizard
that I'm using, I need the steps to be enabled if certain checks
are checked, otherwise the next step can not be enabled.
Ihavethesestepsintheform:
<divclass="form-bootstrapWizard">
<ul class="bootstrapWizard form-wizard">
<li class="active" data-target="#step1">
<a href="#tab1" data-toggle="tab"> <span class="step">1</span> <span class="title">Termo 1</span> </a>
</li>
<li data-target="#step2">
<a href="#tab2" data-toggle="tab"> <span class="step">2</span> <span class="title">Termo 2</span> </a>
</li>
<li data-target="#step3">
<a href="#tab3" data-toggle="tab"> <span class="step">3</span> <span class="title">Termo 3</span> </a>
</li>
<li data-target="#step4">
<a href="#tab4" data-toggle="tab"> <span class="step">4</span> <span class="title">Salvar</span> </a>
</li>
</ul>
<div class="clearfix"></div>
My attempt to do this is as follows:
if($("#CheckTermo1").is(':checked')){ if("data-target" == "#tab2"){ $(".next").prop("disabled", true); } else { $(".next").attr("disabled",false); } }
I have the CheckTermo1
that marked should enable step2
, CheckTermo2
will enable step3
and CheckTermo3
will enable step4
.
The checks are as follows:
<input name="CheckTermo1" type="checkbox" class="checkbox style-0" id="CheckTermo1" value="0" required>
<input name="CheckTermo2" type="checkbox" class="checkbox style-0" id="CheckTermo2" value="0" required>
<input name="CheckTermo3" type="checkbox" class="checkbox style-0" id="CheckTermo3" value="0" required>