forked from bethrobson/Head-First-JavaScript-Programming
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjquery.html
More file actions
29 lines (27 loc) · 497 Bytes
/
jquery.html
File metadata and controls
29 lines (27 loc) · 497 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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title> Brief intro to jQuery </title>
<style>
div {
margin: 20px;
padding: 50px;
background-color: lightyellow;
}
</style>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
$(function() {
$("#specialoffer").click(function() {
$(this).fadeOut(800, function() {
$(this).fadeIn(400);
});
});
});
</script>
</head>
<body>
<div id="specialoffer">I'm a special offer</div>
</body>
</html>