Last active
December 1, 2020 21:03
-
-
Save matiaslopezd/b5a685b5266dfd64efe0a83b432ae4d9 to your computer and use it in GitHub Desktop.
ATM script buttons footer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const nodes = [439, 5422, 5424, 5426]; | |
| function addClass(node, number) { | |
| node.classList.remove('popmake-439'); | |
| node.classList.add(`popmake-${number}`); | |
| } | |
| document.querySelectorAll('.popmake-439').forEach((node, index) => (nodes[index]) && addClass(node, nodes[index])); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const nodes=[439,5422,5422,5424,5426];function addClass(s,e){s.classList.remove("popmake-439"),s.classList.add(`popmake-${e}`)}document.querySelectorAll(".popmake-439").forEach((s,e)=>nodes[e]&&addClass(s,nodes[e])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I updated because is improvable... 😂