Repository navigation
Expand file tree
/
Copy pathtabs.html
More file actions
119 lines (99 loc) · 3.11 KB
/
Copy pathtabs.html
File metadata and controls
119 lines (99 loc) · 3.11 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
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
<!--
senza nome.html
Copyright 2016 Fabio DM <fadimatteo@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>pobTabs</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<style>
.container{ width: 600px; }
.LabelContainer{
background-color: #4D4D4D;
background: linear-gradient(#fff, #999);
padding-top: 3px;
}
.tab{
border-top-left-radius: 10px 5px;
border-top-right-radius: 10px 5px;
font-size: 18px;
margin-right: 3px;
padding-left: 3px;
padding-right: 3px;
background-color: #BFBFBF;
text-decoration: none;
color: #4D4D4D;
box-shadow: 0px -1px 5px #888888;
}
.openTab{
color: #FFFFFF;
background-color: #4D4D4D;
font-weight: bold;
box-shadow: 0px -7px 5px #888888;
}
.bodyTabs{
background-color: #BFBFBF;
background: linear-gradient(#fff, #999);
padding: 5px;
}
</style>
<script src="jquery-2.2.3.min.js"></script>
<script src="../pobTabs.js"></script>
<script>
$(document).ready(function(){
var myTabs = new pobTabs();
myTabs.border='1px solid #BFBFBF';
//Bind to css class
myTabs.cssClass='container'
myTabs.cssClassLabelContainer='LabelContainer';
myTabs.cssClassBody='bodyTabs';
myTabs.cssClassClickedTab='openTab';
myTabs.loadingMessage='<img src="loader.gif" />'
//Adding some tabs. (Label, content url, id, class)
myTabs.addTab('Tab 0','tab0.html','tab0','tab');
myTabs.addTab('Tab 1','tab1.html','tab1','tab');
myTabs.addTab('Tab 2','tab2.html','tab2','tab');
myTabs.after='';
myTabs.attach('body');
//Load tab at the start
myTabs.loadTab('tab0', 'tab0.html');
//interact with tabs
$('#mybtn0').click(function(){
//load a specific tab
myTabs.loadTab('tab1', 'tab1.html');
});
var c=3;
$('#mybtn1').click(function(){
//Append tab at runtime
myTabs.appendTab('Tab '+c,'tabn.html','tab'+c,'tab');
c++;
});
//Delete tab at runtime
$('#mybtn').click(function(){
myTabs.deleteTab(myTabs.getCurrent());
});
});
</script>
</head>
<body>
<p>
<button id="mybtn0">Load tab 1</button>
<button id="mybtn1">Add Tab at runtime</button>
<button id="mybtn">Delete current tab</button>
</p>
</body>
</html>