Fade in and fade out all division elements using jquery
HTML Code :
<!DOCTYPE html> <html> <head> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <meta charset="utf-8"> <title>Fade in and fade out all division elements</title> </head> <body> <div style="background:#2E9AFE;width:100%;">My Effect is fadeOut Effect</div> <button id="btn2">Fade In (3 Second)</button> <button id="btn1">Fade Out (3 Second)</button> </body> </html>
JavaScript Code :
$(document).ready(function(){ $("#btn1").click(function(){ $("div").fadeOut(3000); }); $("#btn2").click(function(){ $("div").fadeIn(3000); }); });
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 :