UNPKG

8.35 kBHTMLView Raw
1<!doctype html>
2<html lang="en">
3<head>
4 <title>jQuery Smart Tab - The flexible jQuery tab control plugin</title>
5 <meta charset="UTF-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7
8 <!-- Include SmartTab CSS -->
9 <link href="./css/smart_tab_all.min.css" rel="stylesheet" type="text/css" />
10
11 <!-- Demo Page Style - You don't need -->
12 <style>
13 body {
14 padding-right: 5%;
15 padding-left: 5%;
16 }
17 </style>
18
19</head>
20<body>
21
22 <p>
23 <label>Theme:</label>
24 <select id="theme_selector">
25 <option value="default" selected>Default</option>
26 <option value="classic">Classic</option>
27 <option value="dark">Dark</option>
28 <option value="brick">Brick</option>
29 <option value="round">Round</option>
30 <option value="pills">Pills</option>
31 <option value="github">GitHub</option>
32 <option value="sourceforge">Sourceforge</option>
33 <option value="">No Theme</option>
34 </select>
35
36 &nbsp;&nbsp;&nbsp;&nbsp;
37 <input type="checkbox" id="is_vertical" value="1" />
38 <label for="is_vertical">Vertical</label>
39
40 &nbsp;&nbsp;&nbsp;&nbsp;
41 <input type="checkbox" id="is_justified" value="1" checked />
42 <label for="is_justified">Justified</label>
43
44 &nbsp;&nbsp;&nbsp;&nbsp;
45 <label>Animation:</label>
46 <select id="animation">
47 <option value="none">None</option>
48 <option value="fade">Fade</option>
49 <option value="slide-horizontal">Slide Horizontal</option>
50 <option value="slide-vertical">Slide Vertical</option>
51 <option value="slide-swing">Slide Swing</option>
52 </select>
53
54 &nbsp;&nbsp;&nbsp;&nbsp;
55 <label>Go To:</label>
56 <select id="got_to_tab">
57 <option value="1">1</option>
58 <option value="2">2</option>
59 <option value="3">3</option>
60 <option value="4">4</option>
61 </select>
62 </p>
63 <br />
64
65
66 <!-- SmartTab html -->
67 <div id="smarttab">
68
69 <ul class="nav">
70 <li>
71 <a class="nav-link" href="#tab-1">
72 <strong>Tab 1</strong> This is tab description
73 </a>
74 </li>
75 <li>
76 <a class="nav-link" href="#tab-2">
77 <strong>Tab 2</strong> This is tab description
78 </a>
79 </li>
80 <li>
81 <a class="nav-link" href="#tab-3">
82 <strong>Tab 3</strong> This is tab description
83 </a>
84 </li>
85 <li>
86 <a class="nav-link" href="#tab-4">
87 <strong>Tab 4</strong> This is tab description
88 </a>
89 </li>
90 </ul>
91
92 <div class="tab-content">
93 <div id="tab-1" class="tab-pane" role="tabpanel">
94 <h3>Tab 1 Content</h3>
95 Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
96 </div>
97 <div id="tab-2" class="tab-pane" role="tabpanel">
98 <h3>Tab 2 Content</h3>
99 <div>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </div>
100 </div>
101 <div id="tab-3" class="tab-pane" role="tabpanel">
102 Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
103 </div>
104 <div id="tab-4" class="tab-pane" role="tabpanel">
105 <h3>Tab 4 Content</h3>
106 Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
107 Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
108 </div>
109 </div>
110 </div>
111
112 <!-- Include jQuery -->
113 <script src="https://code.jquery.com/jquery-3.5.0.min.js" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script>
114
115 <!-- Include SmartTab JavaScript source -->
116 <script type="text/javascript" src="./js/jquery.smartTab.min.js"></script>
117
118 <script type="text/javascript">
119 $(document).ready(function() {
120
121 // SmartTab initialize
122 $('#smarttab').smartTab();
123
124
125 // Demo Button Events
126 $("#got_to_tab").on("change", function() {
127 // Go to tab
128 var tab_index = $(this).val() - 1;
129 $('#smarttab').smartTab("goToTab", tab_index);
130 return true;
131 });
132
133 $("#is_vertical").on("click", function() {
134 // Change Orientation
135 var options = {
136 orientation: ($(this).prop("checked") == true) ? 'vertical' : 'horizontal'
137 };
138 $('#smarttab').smartTab("setOptions", options);
139 return true;
140 });
141
142 $("#is_justified").on("click", function() {
143 // Change Justify
144 var options = {
145 justified: $(this).prop("checked")
146 };
147
148 $('#smarttab').smartTab("setOptions", options);
149 return true;
150 });
151
152 $("#animation").on("change", function() {
153 // Change theme
154 var options = {
155 transition: {
156 animation: $(this).val()
157 },
158 };
159 $('#smarttab').smartTab("setOptions", options);
160 return true;
161 });
162
163 $("#theme_selector").on("change", function() {
164 // Change theme
165 var options = {
166 theme: $(this).val()
167 };
168 $('#smarttab').smartTab("setOptions", options);
169 return true;
170 });
171
172 });
173 </script>
174</body>
175</html>