"spoil"
Bootstrap 4.0.0 Snippet by xrozix

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="panel panel-success autocollapse"> <div class="panel-heading clickable"> <h3 class="panel-title"> Success Title </h3> </div> <div class="panel-body"> <img src="http://www.newzfrance.com/prezauto/test/nfo/index.php/?file=4all.eyez.on.me.2017.french.720p.bluray.x264-lost.nfo"/> </div> </div>
.clickable { cursor: pointer; }
$(document).on('click', '.panel div.clickable', function (e) { var $this = $(this); //Heading var $panel = $this.parent('.panel'); var $panel_body = $panel.children('.panel-body'); var $display = $panel_body.css('display'); if ($display == 'block') { $panel_body.slideUp(); } else if($display == 'none') { $panel_body.slideDown(); } }); $(document).ready(function(e){ var $classy = '.panel.autocollapse'; var $found = $($classy); $found.find('.panel-body').hide(); $found.removeClass($classy); });

Related: See More


Questions / Comments: