jQuery hide() with speed

Description

jQuery hide() with speed

View in separate window

<!DOCTYPE html>
<html>
<head>
<script 
 src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js">
</script>/*  w w w.  ja v a  2  s  .c o  m*/
<script>
$(document).ready(function(){
  $(".btn1").click(function(){
    $("p").hide(1000);
  });
  $(".btn2").click(function(){
    $("p").show(1000);
  });
});
</script>
</head>
<body>

<p>This is a paragraph.</p>

<button class="btn1">Hide</button>
<button class="btn2">Show</button>

</body>
</html>



PreviousNext

Related