"Learn jQuery"
Bootstrap 3.3.0 Snippet by aisherwo

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <h2>Create your snippet's HTML, CSS and Javascript in the editor tabs</h2> <p>Demonstrate fadeOut() with different parameters.</p> <button type="button" class="btn btn-info">Click Here to Fade the Boxes</button><br><br> <div id="div1"><img src="https://pbs.twimg.com/profile_images/965036344216039424/NQOVAYZ-_400x400.jpg" style="width:80px"></div><br> <div id="div2" style="width:80px;height:80px;background-color:green;"></div><br> <div id="div3" style="width:80px;height:80px;background-color:blue;"></div> <br> <p>Click the bunny to make it disappear!</p> <img src="https://static.boredpanda.com/blog/wp-content/uploads/2016/08/bunny8-57a2765cf139e__880.jpg" style="width:200px;margin:20px;"> </div> </div>
h2 { color: blue; }
$(document).ready(function(){ $("button").click(function(){ $("#div1").fadeOut(); $("#div2").fadeOut("slow"); $("#div3").fadeOut(3000); }); }); $(document).ready(function(){ $("img").click(function(){ $(this).hide(); }); });

Related: See More


Questions / Comments: