-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathq_a.html
More file actions
83 lines (64 loc) · 1.37 KB
/
q_a.html
File metadata and controls
83 lines (64 loc) · 1.37 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery demo</title>
<style>
.censored {
color:black;
background-color:black;
}
ul{
margin: 0 auto;
padding: 0;
}
li span {
padding: 2em;
display-style: table-cell;
}
.left {
border: 1px dotted red;
width: 300px;
}
.right {
border: 1px dotted grey;
width: 300px;
}
</style>
</head>
<body>
<a href="http://jquery.com/">jQuery</a>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("a").click(function(event){
alert("As you can see, the link no longer took you to jquery.com");
event.preventDefault();
});
$(".right").addClass("censored");
$(".censored").click(
function() {
$(this).toggleClass("censored");
}
);
});
</script>
<ul class='multiple_columns'>
<li><span class="left">This is the question.</span>
<span class="right">This is the answer.<span>
</li>
<li><span class="left"></span>
<span class="right"><span>
</li>
<li><span class="left"></span>
<span class="right"><span>
</li>
<li><span class="left"></span>
<span class="right"><span>
</li>
<li><span class="left"></span>
<span class="right"><span>
</li>
</ul>
</body>
</html>