"Learn jQuery"
Bootstrap 3.3.0 Snippet by NotGarrettOkay

<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>Learn jQuery</h2> <br> <br> <p>If you click on the "Hide" button, I will disappear.</p> <br> <button id="hide" type="button" class="btn btn-primary">Hide</button> <div style="background:#98bf21;height:100px;width:100px;position:absolute;"></div> </div> </div>
h2{ color:red; }
$(document).ready(function(){ $("#hide").click(function(){ $("p").toggle(); $(this).text(function(i, text){ $("div").animate({left: '250px'}); return text === "Hide" ? "Show" : "Hide"; }); }); });

Related: See More


Questions / Comments: