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">&times;</span><span class="sr-only">close</span> </button> 

this make close button close panel opposed parent element.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -