-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
35 lines (31 loc) · 831 Bytes
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>Home</title>
<style>
li.collapsible {
list-style: none;
}
</style>
</head>
<body>
<h2>Home</h2>
<ul>
<li><a href='pdfs.html'>pdfs.html</a></li><li><a href='domains.html'>domains.html</a></li>
</ul>
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script>
$('.collapsible').each(function () {
var el = $(this);
var collapser = $('<span>').text('+');
el.prepend(collapser);
collapser.click(function () {
el.children('ul').toggle();
collapser.text(collapser.text() == '+' ? '-' : '+');
})
el.find('ul').hide();
console.log(el.children('ul'));
});
</script>
</body>
</html>