Spaces:
Running
Running
Miguel Diaz
commited on
Commit
•
cc7408f
1
Parent(s):
30dd895
pruebas tabs
Browse files- static/main2.html +24 -24
static/main2.html
CHANGED
@@ -17,9 +17,9 @@
|
|
17 |
|
18 |
<div class="wrapper">
|
19 |
<div class="tab">
|
20 |
-
<button class="tablinks" >Tab 1</button>
|
21 |
-
<button class="tablinks" >Tab 2</button>
|
22 |
-
<button class="tablinks" >Tab 3</button>
|
23 |
</div>
|
24 |
<div id="tab1" class="tabcontent">
|
25 |
<div class="chat" id="chat1"></div>
|
@@ -56,26 +56,26 @@
|
|
56 |
$(document).ready(function() {
|
57 |
chatH = new ChatGPT("{% token %}");
|
58 |
windH = new WindowHandler();
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
</body>
|
81 |
</html>
|
|
|
17 |
|
18 |
<div class="wrapper">
|
19 |
<div class="tab">
|
20 |
+
<button class="tablinks" onclick="openTab(event, 'tab1')">Tab 1</button>
|
21 |
+
<button class="tablinks" onclick="openTab(event, 'tab2')">Tab 2</button>
|
22 |
+
<button class="tablinks" onclick="openTab(event, 'tab3')">Tab 3</button>
|
23 |
</div>
|
24 |
<div id="tab1" class="tabcontent">
|
25 |
<div class="chat" id="chat1"></div>
|
|
|
56 |
$(document).ready(function() {
|
57 |
chatH = new ChatGPT("{% token %}");
|
58 |
windH = new WindowHandler();
|
59 |
+
|
60 |
+
|
61 |
+
|
62 |
+
|
63 |
+
function openTab(evt, tabName) {
|
64 |
+
var i, tabcontent, tablinks;
|
65 |
+
|
66 |
+
tabcontent = document.getElementsByClassName("tabcontent");
|
67 |
+
for (i = 0; i < tabcontent.length; i++) {
|
68 |
+
tabcontent[i].style.display = "none";
|
69 |
+
}
|
70 |
+
|
71 |
+
tablinks = document.getElementsByClassName("tablinks");
|
72 |
+
for (i = 0; i < tablinks.length; i++) {
|
73 |
+
tablinks[i].className = tablinks[i].className.replace(" active", "");
|
74 |
+
}
|
75 |
+
|
76 |
+
document.getElementById(tabName).style.display = "block";
|
77 |
+
evt.currentTarget.className += " active";
|
78 |
+
}
|
79 |
+
</script>
|
80 |
</body>
|
81 |
</html>
|