-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathindex.html
More file actions
93 lines (79 loc) · 3.1 KB
/
Copy pathindex.html
File metadata and controls
93 lines (79 loc) · 3.1 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.1.js"></script>
<style type="text/css">
.quiart{
color: rgb(255, 255, 255);
font-weight: bold;
font-size: 80px;
width: 800px;
background-color: rgb(255, 0, 0);
margin-bottom: 20px;
}
.aqua {
background-color: rgb(127, 255, 212);
width: 100px;
height: 100px;
}
.aqua-blue {
background-color: rgb(0, 0, 255);
}
</style>
<script type="text/javascript">
$(function(){
$('#q1').click(function(){
$(this).hide();
});
$('#q2').click(function(){
$(this).hide(3000);
});
// $('#q2').click(function(){
// $(this).hide(3000, function(){
// $(this).show();
// });
// });
$('#q3').click(function(){
$(this).fadeOut();
});
$('#q4').click(function(){
$(this).fadeOut(3000);
});
$('#but1').click(function(){
$('#div1').toggle();
});
$('#but2').click(function(){
$('#div1').slideToggle();
});
// $('#div1').mouseover(function(){
// $(this).css('background-color', 'blue');
// });
//
// $('#div1').mouseout(function(){
// $(this).css('background-color', 'aquamarine');
// });
// $('#div1').hover(function(){
// $(this).css('background-color', 'blue');
// }, function(){
// $(this).css('background-color', 'aquamarine');
// });
$('#div1').hover(function(){
$(this).toggleClass('aqua-blue');
});
})
</script>
</head>
<body>
<div id="q1" class="quiart">click me to hide</div>
<div id="q2" class="quiart">click me to hide slowly</div>
<div id="q3" class="quiart">click me to fadeout</div>
<div id="q4" class="quiart">click me to fadeout slowly</div>
<br>
<br>
<button id="but1">click to toggle aquamarine div</button>
<button id="but2">click to slide aquamarine div</button>
<div id="div1" class="aqua"></div>
</body>
</html>