-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirstanimate.html
36 lines (34 loc) · 1.12 KB
/
firstanimate.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<html>
<head>
<title>jquery example</title>
<!-- This line will load the bootstrap css file -->
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<!-- This file will load jquery file so that we can use its function -->
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
</head>
<body>
<div class="panel panel-primary">
<h3 class="text-primary" align="center"> jquery example : animate() method</h3>
</div>
<div id="div1" class="panel panel-primary" align="center"><br>
<button align="center" class="btn btn-md btn-primary">Click here to see animation</button>
<br><br>
</div>
<div id="div2" align="center" style="background-color:yellow;" class="panel panel-primary">
<p align="center" style="background-color:yellow;height:100px;width:80px;" class="text text-primary" >This is the under the div with id="div2"</p>
</div>
</body>
When
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$("#div2").animate({
left:'250px',
opacity:'0.5',
height:'300px',
width:'300px'
});
});
});
</script>
</html>