@DrissssirD
Submitted
I couldn't make the clock and eth sections inline any solutions please? a nice feedback would be great!
@Ogshabzy23101
@DrissssirD
Submitted
I couldn't make the clock and eth sections inline any solutions please? a nice feedback would be great!
@Ogshabzy23101
Posted
i will suggest you put the 2 component into a div, then style the div to display flex, flex direction row, justify content space between. hope this is helpfull please rate my comment thanks
@giovanigomez1
Submitted
I used Html, Css and Javascript but not sure if the Html semantic structure is correct, also the user is able to open all answers at once but is it better to allow them to open a single answer at time instead? Any feedback is very welcome.
@Ogshabzy23101
Posted
i will suggest you add eventlistener to each button and target the granparent element of each button, then toggle the class list of hidden. then also check under the button event listener if each granparent equals to the current granparent, if it does then remove the hidden class
const quesContainer = document.querySelectorAll('.ques-container')
const btns = document.querySelectorAll('.btn')
btns.forEach(function (btn) {
btn.addEventListener('click', function (e) {
const question = e.currentTarget.parentElement.parentElement
quesContainer.forEach(function (newQuestion) { if (newQuestion !== question) { newQuestion.classList.remove('show-text')
} })
question.classList.toggle('show-text')
})
})
i hope the is helpful, please rate my suggestion. thanks
Marked as helpful