Commit
·
12761b6
1
Parent(s):
aad24ff
28. Sept. 2024, 10:28
Browse files- javascript.js +3 -3
javascript.js
CHANGED
@@ -2,7 +2,7 @@ function gradioCustomJS() {
|
|
2 |
console.log("gradioCustomJS Started")
|
3 |
|
4 |
//component-15
|
5 |
-
const tabNav = document.querySelector("
|
6 |
tabNav.addEventListener("mouseover", () => {
|
7 |
tabNav.addEventListener("wheel", (event) => {
|
8 |
event.preventDefault()
|
@@ -20,8 +20,8 @@ function gradioCustomJS() {
|
|
20 |
tabNav.addEventListener("mouseout", () => {
|
21 |
tabNav.removeEventListener("wheel", (event) => {
|
22 |
event.preventDefault()
|
23 |
-
const scrollLeft = tabNav.scrollLeft + 10
|
24 |
-
tabNav.scrollLeft = Math.max(0, Math.min(scrollLeft, tabNav.scrollWidth - tabNav.clientWidth))
|
25 |
})
|
26 |
})
|
27 |
|
|
|
2 |
console.log("gradioCustomJS Started")
|
3 |
|
4 |
//component-15
|
5 |
+
const tabNav = document.querySelector("div.tab-nav")
|
6 |
tabNav.addEventListener("mouseover", () => {
|
7 |
tabNav.addEventListener("wheel", (event) => {
|
8 |
event.preventDefault()
|
|
|
20 |
tabNav.addEventListener("mouseout", () => {
|
21 |
tabNav.removeEventListener("wheel", (event) => {
|
22 |
event.preventDefault()
|
23 |
+
// const scrollLeft = tabNav.scrollLeft + 10
|
24 |
+
// tabNav.scrollLeft = Math.max(0, Math.min(scrollLeft, tabNav.scrollWidth - tabNav.clientWidth))
|
25 |
})
|
26 |
})
|
27 |
|