Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const giveLevels = Array.from(document.querySelectorAll('.give-donation-level-btn'));
- giveLevels.pop();
- const customAmount = document.querySelector('.give-btn-level-custom');
- const giveTotal = document.querySelector('.give-total-wrap');
- function hide() {
- giveTotal.classList.add("hide");
- }
- function show() {
- giveTotal.classList.remove("hide");
- }
- customAmount.addEventListener("click", show, false);
- giveLevels.forEach((level) => {
- level.addEventListener('click', hide, false);
- });
Add Comment
Please, Sign In to add comment