In bootstrap, when you do a camber effect, as shown below:
<p>
<a class="btn btn-primary" data-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
Link with href
</a>
<button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
Button with data-target
</button>
</p>
<div class="collapse" id="collapseExample">
<div class="card card-block">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.
</div>
</div>
why will the buttons refer to the class data-toggle=collapseand data-target=#collapseExamplepanel id for the effect? Could you get the identifier enough to switch its state?
is it because data switching refers to what effect he is going to use, why is aiming at a panel with it?
source
share