-
Notifications
You must be signed in to change notification settings - Fork 0
/
day5.html
39 lines (34 loc) · 848 Bytes
/
day5.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
37
38
39
<html>
<head>
<meta charset=utf-8>
<title>jQuery Events 201</title>
<link rel="stylesheet" type="text/css" href="day5_style.css">
</head>
<body>
<dl>
<dt>What are your hours?</dt>
<dd>we are open 24/7</dd>
<dt>What are your hours?</dt>
<dd>we are open 24/7</dd>
<dt>What are your hours?</dt>
<dd>we are open 24/7</dd>
<dt>What are your hours?</dt>
<dd>we are open 24/7</dd>
<dt>What are your hours?</dt>
<dd>we are open 24/7</dd>
</dl>
<script src ="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
(function() {
$('dd').filter(':nth-child(n+4)').addClass('hide');
$('dl').on('mouseenter', 'dt', function() {
$(this)
.next()
.slideDown(200)
.siblings('dd')
.slideUp(300);
});
})();
</script>
</body>
</html>