Jquery smaple aniate

by Rayudu Ikkurthi

HTML

<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<button id="go1">&raquo; Animate Block1</button>
<button id="go4">&raquo; Reset</button>

<div id="block1">Block1</div>
<div id="block2">Block2</div>

CSS

div {
    background-color: #bca;
    width: 200px;
    height: 1.1em;
    text-align: center;
    border: 2px solid green;
    margin: 3px;
    font-size: 14px;
  }
  button {
    font-size: 14px;
  }

JavaScript

$( "#go1" ).click(function() {
  $( "#block1" )
    .animate({
      width: "90%"
    }, {
      queue: true,
      duration: 3000
    })
    .animate({ fontSize: "24px" }, 1500 )
    .animate({ borderRightWidth: "15px" }, 1500 );
});
 

 
 
$( "#go4" ).click(function() {
  $( "div" ).css({
    width: "",
    fontSize: "",
    borderWidth: ""
  });
});