jQuery animate() font Size

Description

jQuery animate() font Size

View in separate window



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

<button class="btn1">Animate</button>
<button class="btn2">Reset</button>

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

</body>
</html>



PreviousNext

Related