0
I have the following situation
<div class="container">
<div class="row">
<div class="col-md-1">
</div>
<div class="col-md-10">
</div>
</div>
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#1">1</a></li>
<li><a data-toggle="tab" href="#2">2</a></li>
<li><a data-toggle="tab" href="#3">3</a></li>
</ul>
<div class="tab-content">
<div id="1" class="tab-pane tab tab-label fade in active">
<button>1</button>
</div>
<div id="2" class="tab-pane fade">
<button>2</button>
</div>
<div id="3" class="tab-pane fade">
<button>3</button>
</div>
</div>
</div>
<div class="row">
<center><button name="qual_tab">Qual TAB esta selecionada</button></center>
</div>
I would like to press the button "QUAL_TAB" and know which TAB is active.
I have no idea how to proceed.
Put something HTML on the button?? Put something javascript on the on-click button?? Or another procedure I don’t see at the moment??
thanks. PERFECT :) Vote but deserved :). A question now. If I have more than one tab-content group?? how should I reference to pick up tabs from one or the other?? Hugs :)
– Ricardo M.Souza
What for jQuery? Pure JS gives account and is even more readable.
– Jéf Bueno
I find it easier to use jquery @LINQ, but this is a matter of opinion.
– Wictor Chaves
@Wictor Chaves Another question.. what would be the attr to catch the Indice?? Do you know where I can read some reference about it (Nav Nav-tab)?? :)
– Ricardo M.Souza
@LINQ How would it be with JS?? Could I give a light??: ) Always good to know more :)
– Ricardo M.Souza
@Souza Posso, 1 minute that I show
– Jéf Bueno
@Okay, I created an answer and left an observation in it, let me know when you see.
– Jéf Bueno
@Wictorchaves Yes, it’s a matter of opinion, but the way you put it in the question seems the only viable way to do it is by using jQuery. It was just a comment on this very thing, it is no criticism for the use of the library. Even because bootstrap requires jQuery then...
– Jéf Bueno
@Souza put Ricardom.Souza taking the index
– Wictor Chaves
@LINQ put an observation, thanks for the tip.
– Wictor Chaves
@Wictor Keys Thank you so much for your attention. : ) Hugs :)
– Ricardo M.Souza