I have the following code:
<div class="col-md-6">
<div class="panel panel-primary copyright-wrap" id="copyright-wrap">
<div class="panel-heading">
Copyright Info
<button type="button" class="close"
data-target="copyright-wrap"
data-dismiss="panel">
<span aria-hidden="true">×</span><span class="sr-only">Close</span>
</button>
</div>
<div class="panel-body">
© some random dude
</div>
</div>
</div>
But for some reason it just doesn't work. Is a panel
even dismissable? I found solutions for alerts and modals, but not for panels. Another person stated, that there is an undocumented feature ( How can I dismiss a bootstrap panel using data-dismiss? )
But that didn't work either.
Have a look at this JSFiddle
As per Relequestual's code, it seems you were missing the hashtag in the target
parameter, and the dismiss
parameter was suppose to stay set to alert
.
example: http://jsfiddle.net/y9yroaee/
Please use this sample Code:
<div class="panel panel-default fade in collapse" id="demo" >
<div class="panel-heading"> <a data-toggle="collapse" href="#demo" class="close" >× </a>
</div><div class="panel-body"></div></div>
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