-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.html
84 lines (76 loc) · 1.59 KB
/
menu.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
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
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Menu Component Sample</title>
<link rel="stylesheet" href="css/j-components.css">
<style>
ul{
padding:0px;
}
ul.menu-holder li{
list-style:none;
float:left;
}
ul.menu-holder li.active a{
color: red;
}
ul.menu-holder > li > a{
padding: 10px;
text-decoration:none;
border:1px solid #ccc;
}
</style>
</head>
<body>
<div class="j-component" data-type="menu">
<ul class="menu-holder">
<li>
<a href="#" class="trigger">test 1</a>
<ul class="submenu">
<li>
<a href="#">test 1 menu 1</a>
</li>
</ul>
</li>
<li class="hover">
<a href="#" class="trigger">test 2</a>
<ul class="submenu">
<li>
<a href="#">test 2 menu 1</a>
</li>
</ul>
</li>
</ul>
</div>
<br>
<br>
<strong>Tabs Sample</strong>
<div class="j-component" data-type="menu tab">
<ul class="menu-holder">
<li class="active">
<a href="#" data-tab="test1">test 1</a>
</li>
<li class="hover">
<a href="#" data-tab="test2">test 2</a>
</li>
</ul>
<div class="tab-contents">
<div class="tab active" data-tab="test1">
test 1
</div>
<div class="tab" data-tab="test2">
test 2
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="js/helpers.js"></script>
<script src="js/menu.js"></script>
<script>
$(function(){
$('body').menu();
});
</script>
</body>
</html>