"Learning More jQuery"
Bootstrap 4.0.0 Snippet by AmyMorand

<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="//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 More jQuery</h2><br> <p>Demonstrate fadeToggle() with different speed parameters.</p><br> <button class="1">Click to fade in/out boxes</button><br><br> <div id="div1" style="width:80px;height:300px;background-color:red;"></div> <br> <div id="div2" style="width:80px;height:300px;background-color:orange;"></div> <br> <div id="div3" style="width:80px;height:300px;background-color:yellow;"></div> <br> <div id="div4" style="width:80px;height:300px;background-color:green;"></div> <br> <div id="div5" style="width:80px;height:300px;background-color:blue;"></div> <br> <div id="div6" style="width:80px;height:300px;background-color:purple;"></div> </div> </div>
p, h2, button, div{ padding: 20px; }
$(document).ready(function(){ $(".1").click(function(){ $("#div1").fadeToggle(1000); $("#div2").fadeToggle(2000); $("#div3").fadeToggle(3000); $("#div4").fadeToggle(4000); $("#div5").fadeToggle(5000); $("#div6").fadeToggle(6000); });Toggle });

Related: See More


Questions / Comments: