Skip to main content

Jquery Fade

In this article we will learn about Jquery Fade:

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $("#div1").fadeIn();
    $("#div2").fadeIn("slow");
    $("#div3").fadeIn(3000);
  });
});
</script>
</head>
<body>


<button>Click me</button><br><br>

<div id="div1" style="width:80px;height:80px;display:none;background-color:red;"></div>

</body>
</html>

Comments