Skip to content

Instantly share code, notes, and snippets.

@matiaslopezd
Last active December 1, 2020 21:03
Show Gist options
  • Save matiaslopezd/b5a685b5266dfd64efe0a83b432ae4d9 to your computer and use it in GitHub Desktop.
Save matiaslopezd/b5a685b5266dfd64efe0a83b432ae4d9 to your computer and use it in GitHub Desktop.
ATM script buttons footer
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]));
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]));
@matiaslopezd
Copy link
Author

I updated because is improvable... 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment