"Learning jquery"
Bootstrap 3.3.0 Snippet by Mikebraun

<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>Learning jquery</h2> <p>Demonstrate fadeIn() with different parameters.</p> <button type="button" class="btn btn-primary">Primary</button><br> <br> <div id="div1" style="width:80px;height:80px;display:none;background-color:red;"></div><br> <div id="div2" style="width:80px;height:80px;display:none;background-color:green;"></div><br> <div id="div3" style="width:80px;height:80px;display:none;background-color:blue;"></div> </div> </div>
h2 { color:blue; }
$(document).ready(function(){ $("button").click(function(){ var d1=4000; var d2=2000; $("#div1").slideDown(d1).slideUp(d2).slideDown(d1).slideUp(d2).slideDown(d1).slideUp(d2).slideDown(d1).slideUp(2000).slideDown(4000).slideUp(2000).slideDown(4000).slideUp(2000).slideDown(4000).slideUp(2000).slideDown(4000).slideUp(2000).slideDown(4000).slideUp(2000).slideDown(4000).slideUp(2000).slideDown(4000).slideUp(2000).slideDown(4000).slideUp(2000); $("#div2").slideDown(2000).slideUp(3000).slideDown(2000).slideUp(4000).slideDown(2000).slideUp(4000).slideDown(2000).slideUp(4000).slideDown(2000).slideUp(4000).slideDown(2000).slideUp(4000).slideDown(2000).slideUp(4000).slideDown(2000).slideUp(4000).slideDown(2000).slideUp(4000).slideDown(2000).slideUp(4000).slideDown(2000).slideUp(4000).slideDown(2000).slideUp(4000); $("#div3").slideDown(4000).slideUp(3000).slideDown(4000).slideUp(3000).slideDown(4000).slideUp(3000).slideDown(4000).slideUp(3000).slideDown(4000).slideUp(3000).slideDown(4000).slideUp(3000).slideDown(4000).slideUp(3000).slideDown(4000).slideUp(3000).slideDown(4000).slideUp(3000).slideDown(4000).slideUp(3000).slideDown(4000).slideUp(3000).slideDown(4000).slideUp(3000); }); });

Related: See More


Questions / Comments: