javascript - How can I dismiss a bootstrap panel using data-dismiss? -
i have button opens panel , want able close alert.
the default panel example bootstrap docs
<div class="panel panel-default"> <div class="panel-heading">panel heading without title</div> <div class="panel-body"> panel content </div> </div>
if add close button documented alert panels header, button removes header only.
you can using undocument feature set target of dismiss action...
<button type="button" class="close" data-target="#id_of_panel" data-dismiss="alert"> <span aria-hidden="true">×</span><span class="sr-only">close</span> </button>
this make close button close panel opposed parent element.
Comments
Post a Comment