Archived
done: basic main table UI
This commit is contained in:
1 parent
6eb6c59508
commit
c687df6a4b
6 files changed
+483
-9
No files matched your search
@@ -0,0 +1,28 @@
|
||||
window.onload = () => {
|
||||
main()
|
||||
}
|
||||
|
||||
function main() {
|
||||
const tableContainer = document.getElementById("table-outer-scrollable-container")
|
||||
const tableItems = tableContainer.children
|
||||
const backgroundColor = "rgba(164,168,157,0.16)"
|
||||
|
||||
for (let i = 1; i < tableItems.length; i += 2) {
|
||||
if (hasSpecificClassNameByNode(tableItems[i], "table-items-container")) {
|
||||
tableItems[i].setAttribute("style", `background-color: ${backgroundColor};`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function hasSpecificClassNameByNode(node, className) {
|
||||
const classList = node.classList
|
||||
let isContain = false
|
||||
|
||||
classList.forEach((value) => {
|
||||
if (value === className) {
|
||||
isContain = true
|
||||
}
|
||||
})
|
||||
|
||||
return isContain
|
||||
}
|
||||
Reference in new issue
Block a user