-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
executable file
·131 lines (127 loc) · 6.64 KB
/
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
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Taby</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2, user-scalable=yes">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link rel="stylesheet" type="text/css" href="taby.css" />
<!--[if lte IE 9]>
<script src="vendor/js/jquery.js"></script>
<![endif]-->
<script src="vendor/js/ready.js"></script>
<script src="taby.js"></script>
<script>
domready(function () {
var render = '',
tmpHTMLFixture = '',
HTMLFixture =
'<div class="taby hidden" data-tab-content="%int%">'+
'<h3><a name="%int%">%int%</a></h3>'+
'<div class="content">'+
'Lorum Ipsum Cipsum Hipsum. Dada du huhu ba. Lorum Ipsum Cipsum Hipsum. Dada du huhu ba.'+
'Lorum Ipsum Cipsum Hipsum. Dada du huhu ba. Lorum Ipsum Cipsum Hipsum. Dada du huhu ba.'+
'Lorum Ipsum Cipsum Hipsum. Dada du huhu ba. Lorum Ipsum Cipsum Hipsum. Dada du huhu ba.'+
'Lorum Ipsum Cipsum Hipsum. Dada du huhu ba. Lorum Ipsum Cipsum Hipsum. Dada du huhu ba.'+
'Lorum Ipsum Cipsum Hipsum. Dada du huhu ba. Lorum Ipsum Cipsum Hipsum. Dada du huhu ba.'+
'Lorum Ipsum Cipsum Hipsum. Dada du huhu ba. Lorum Ipsum Cipsum Hipsum. Dada du huhu ba.'+
'Lorum Ipsum Cipsum Hipsum. Dada du huhu ba. Lorum Ipsum Cipsum Hipsum. Dada du huhu ba.'+
'Lorum Ipsum Cipsum Hipsum. Dada du huhu ba. Lorum Ipsum Cipsum Hipsum. Dada du huhu ba.'+
'Lorum Ipsum Cipsum Hipsum. Dada du huhu ba. Lorum Ipsum Cipsum Hipsum. Dada du huhu ba.'+
'Lorum Ipsum Cipsum Hipsum. Dada du huhu ba. Lorum Ipsum Cipsum Hipsum. Dada du huhu ba.'+
'Lorum Ipsum Cipsum Hipsum. Dada du huhu ba. Lorum Ipsum Cipsum Hipsum. Dada du huhu ba.'+
'Lorum Ipsum Cipsum Hipsum. Dada du huhu ba. Lorum Ipsum Cipsum Hipsum. Dada du huhu ba.'+
'</div>'+
'</div>';
for(var i=1;i<=29;i++){
render += HTMLFixture.replace(/%int%/g, i);
}
document.querySelector('.content-wrapper').innerHTML = render;
// >>> start taby
var taby = new Taby(document.querySelector('.tmp-wrapper .taby'));
taby.onSelect({
14 : function(e){
console.log('14');
return "asdas";
},
27 : function(e){
console.log('27')
}
});
//var taby = new Taby('.tmp-wrapper .taby');
});
</script>
</head>
<body>
<div class="taby-lock" style="background-color:gray;">Lock</div>
<div class="tmp-wrapper">
<!-- Tabs -->
<div class="taby" data-tab>
<ul>
<li>1 [x]
<ul>
<li><a href="#2">2</a></li>
<li>3 [x]
<ul>
<li><a href="#4">4</a></li>
<li>5 [x]
<ul>
<li><a taby="open" href="#6">6</a></li>
<li><a href="#7">7</a></li>
<li><a href="#8">8</a></li>
<li><a href="#9">9</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#10">10</a></li>
<li>11 [x]
<ul>
<li><a href="#12">12</a></li>
<li>13 [x]
<ul>
<li><a href="#14">14</a></li>
<li><a href="#15">15</a></li>
<li data-taby="open"><a href="#14">14</a></li>
<li><a href="#15">15</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li data-taby="open"><a href="#16">16</a></li>
<li>17 [x]
<ul>
<li>19 [x]
<ul>
<li><a href="#20">20</a></li>
<li><a href="#21">21</a></li>
<li><a href="#22">22</a></li>
<li data-taby="open">23 [x]
<ul>
<li><a href="#24">24</a></li>
<li>25 [x]
<ul>
<li><a href="#26">26</a></li>
<li><a href="#27">27</a></li>
<li><a href="#28">28</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a href="#18">18</a></li>
</ul>
</li>
<li><a href="#29">29</a></li>
<li data-taby-fixed-size class="taby-lock taby-lock-icon">x</li>
</ul>
</div>
<div class="content-wrapper" style="clear:both;">
<!-- content -->
</div>
</div>
</body>
</html>