"Close Panel Effects"
Bootstrap 3.1.0 Snippet by yrmc

<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.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 ----------> <head> <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> </head> </div> <div class="row"> <div class="col-md-3 col-sm-6 col-xs-6"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">Using Fade Out</h3> <!-- Watch Out: Here We must use the effect name in the data tag--> <span class="pull-right clickable" data-effect="fadeOut"><i class="fa fa-trash"></i></span> </div> <div class="panel-body"> Panel content </div> <div class="panel-footer"> Panel footer </div> </div> </div>
.panel-heading span { margin-top: -26px; font-size: 15px; margin-right: -12px; } .clickable { background: rgba(0, 0, 0, 0.15); display: inline-block; padding: 6px 12px; border-radius: 4px; cursor: pointer; }
$(function(){ $('.clickable').on('click',function(){ var effect = $(this).data('effect'); $(this).closest('.panel')[effect](); }) })

Related: See More

Questions / Comments: