@melkhateeb193
Posted
that a great job you have done you can make it shorter code you can give to the plus item same id or same class and use query selector all const faqItem = document.querySelectorAll('.faq-item'); like this faqItem.forEach(function(item) { const toggleContent = item.querySelector('.toggle-content'); const plus = item.querySelector('.plus'); const minus = item.querySelector('.minus');
plus.addEventListener('click',function(){ plus.classList.replace('d-block','d-none'); toggleContent.classList.replace('d-none', 'd-block') minus.classList.replace ('d-none', 'd-block') })
minus.addEventListener('click',function(){ plus.classList.replace('d-none', 'd-block'); toggleContent.classList.replace('d-block','d-none') minus.classList.replace ('d-block','d-none') }) }) that will work with you and with less could and keep going you have done a great job
Marked as helpful
@flaviare1s
Posted
@melkhateeb193 Thank you, Mostafa. I spent the morning trying to do this and I couldn't, but I'll try some more using your suggestion. Now I'm trying to put the transition, but I'm not succeeding.
@melkhateeb193
Posted
@flaviare1s if you need any help with this i could help we can enter a meeting and i will make it with u
@flaviare1s
Posted
@melkhateeb193 I would appreciate 😊
@melkhateeb193
Posted
@flaviare1s give me you instagram to schedule meeting or any other contacting platform
@flaviare1s
Posted
@melkhateeb193
My Instagram is @flaviare1s