From 0fa6cd51b0581cc41ae4aad7df6b1ca01cf15edc Mon Sep 17 00:00:00 2001 From: borntojesus Date: Fri, 9 Feb 2024 20:40:52 +0200 Subject: [PATCH] Search v2 fix tab --- templates/new-donate.html | 1940 +++++++++++++++++++------------------ 1 file changed, 979 insertions(+), 961 deletions(-) diff --git a/templates/new-donate.html b/templates/new-donate.html index 7b8f4b80..3d33ce40 100644 --- a/templates/new-donate.html +++ b/templates/new-donate.html @@ -170,967 +170,973 @@ @@ -1184,13 +1190,25 @@ const tabs03 = document.querySelector('.donate-services__tab'); const tabs03CloseBtn = document.querySelector('.donate-services__tab-close'); - openBtn.forEach(item => { - item.onclick = (event) => { - tabs03.classList.remove('donate-services__tab--active') - event.preventDefault() - tabs03.classList.add('donate-services__tab--active') - } - }) + const tab101 = document.querySelector('.donate-services__tab--1'); + const tab102 = document.querySelector('.donate-services__tab--2'); + + openBtn[0].onclick = (event) => { + tabs03.classList.remove('donate-services__tab--active') + event.preventDefault() + tabs03.classList.add('donate-services__tab--active') + tab101.style.display = 'block' + tab102.style.display = 'none' + } + + openBtn[1].onclick = (event) => { + tabs03.classList.remove('donate-services__tab--active') + event.preventDefault() + tabs03.classList.add('donate-services__tab--active') + tab102.style.display = 'block' + tab101.style.display = 'none' + } + tabs03CloseBtn.onclick = () => { tabs03.classList.remove('donate-services__tab--active') }