In bootstrap when I use the data-toggle & data-target attributes my href seems not to work does anyone know a way around this echo'Change'
When data-target="link"
and data-toggle="class"
are set, bootstrap.js uses them to override the default href attribute. Setting the href to a static link will give a noscript browser something to go to.
The standard HTML markup for an anchor tag is:
<a href="link.html">LINK</a>
which is what a noscript browser will see, because it will ignore the data-* values.
For me there was no issue.
<div class="panel">
<a href="http://www.google.com" data-parent="#panel" data-toggle="collapse" data-target="#aa">Collapse</a>
<div id="aa" class="collapse in">aaaaaaaaaaaaaaaaaaaggggggggg hhhhhhhhhh iii ii jjjjjjj kkkkkkk lllllllllll lllllllll mmmmmm mmmm ooooop</div>
</div>
Here my anchor tag takes me to google.com after collapsing the #aa
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With