-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPaddingAnimate.html
More file actions
34 lines (34 loc) · 803 Bytes
/
PaddingAnimate.html
File metadata and controls
34 lines (34 loc) · 803 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>PaddingAnimte</title>
<script src="jquery-3.2.1.min.js"></script>
<script>
$(document).ready(function() {
$('p').animate({
padding: '20px'
}, 2000);
$('#navigation li').hover(
function() {
$(this).animate({paddingLeft: '+=10px'}, 200);
},
function() {
$(this).animate({paddingLeft: '-=10px'}, 200);
});
});
</script>
</head>
<body>
<div id="navigation">
<ul>
<li><a href="#">HomePage</a></li>
<li><a href="#">ClientWebTechnology</a></li>
<li><a href="#">ServerWebTechnology</a></li>
<li><a href="#">AboutMe</a></li>
</ul>
</div>
<p>jQuery is a JavaScipt function library.</p>
<p class="more">jQuery was invented in 2006 by John Resig at BarCamp.</p>
</body>
</html>