I don't understand JS behaviour, but FIXED

Solution retrospective
FIXED
I just added window.location.reload()
to Dismiss Message Button
. But feel free to tell me how to do it better way :)
Hi, The design for mobile and desktop is finished (I know its messy but I made it quickly to submit the solution asap to get your help).
I've tried different methods and 3 of them has one of these issues:
- The code works until I click "Dismiss Message". Then it behaves like script doesn't exist. (Now)
- Dismiss button doesn't work at all with .addEventListener.
- Code doesn't work at all.
I'm not sure about .innerHTML replacement. It looks like the code doesn't find 'js-dismiss-button class for querySelector. I don't know. Please help.
Thank you :)
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on BBualdo's solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord