Animates all divs to slide down and slide up using jquery
HTML Code :
<!DOCTYPE html> <html> <head> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <style> div { background: #0694EC; margin: 3px; width: 80px; height: 100px; display: none; float: left; } </style> <meta charset="utf-8"> <title>Animates all divs to slide down and slide up</title> </head> <body> <button class="btn1">Slide down</button> <button class="btn2">Slide up</button> <br><br> <div></div> <div></div> <div></div> </body> </html>
JavaScript Code :
$(".btn1").click(function(){ $("div").slideDown(); }); $(".btn2").click(function(){ $("div").slideUp(); });
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
HTML Code :
JavaScript Code :