Q:

Fade in and fade out all division elements using jquery

0

Fade in and fade out all division elements using jquery

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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);
  }); 
});

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now