1
would like to know how to make an if with tab active in Javascript
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#negociosRealizados" data-toggle="tab" onclick="reload('negociosRealizados')">Negocios realizados</a></li>
<li><a href="#baixados" data-toggle="tab" onclick="reload('baixados')">Baixados</a></li>
<li><a href="#recomprados" data-toggle="tab" onclick="reload('recomprados')">Recomprados</a></li>
<li><a href="#recompradosOp" data-toggle="tab" onclick="reload('recompradosOp')">Debitos Recomprados em Operação</a></li>
</ul>
<div class="tab-content">
<div class="active tab-pane" id="negociosRealizados">
</div>
<!-- /.tab-pane -->
<div class="tab-pane" id="baixados">
</div>
<!-- /.tab-pane -->
<div class="tab-pane" id="recomprados">
</div>
<!-- /.tab-pane -->
<div class="tab-pane" id="recompradosOp">
</div>
<!-- /.tab-pane -->
</div>
<!-- /.tab-content -->
</div>
<!-- /.nav-tabs-custom -->
For example, if (tradeRealized = active)
When do you plan to do this check? In what action?
– JrD
A way to bring id to a JS function, if the realigned trades are active, passes the id realized trades
– matheus gomes
Possible duplicate of Detect if an element contains a class with pure Javascript
– JrD