moves the <div> element to the right, and then increases the font size of the text - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:animate

Description

moves the <div> element to the right, and then increases the font size of the text

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("button").click(function(){
        var div = $("div");
        div.animate({left: '100px'}, "slow");
        div.animate({fontSize: '3em'}, "slow");
    });//  www . ja  v a 2 s  . c  o m
});
</script>
</head>
<body>

<button>Start Animation</button>

<div style="background:#98bf21;height:100px;width:200px;position:absolute;">HELLO</div>

</body>
</html>

Related Tutorials