Design comparison
Solution retrospective
I would like to make the socials popout dissapear when user clicks outside it. I've tried to use "blur" event but I couldn't figure it out.
Community feedback
- @scorpion61Posted about 4 years ago
Hi MKSAWIC, You can use a hide class on share popup box which you will declare display: none on css, then activate it with JS. You can make a click event on popup, if event.target equals to window object, then add class of hide to the popup. I hope i was able to explain the logic :D
0@mksawicPosted about 4 years ago@scorpion61 Hi, thanks for your advice. Actually I've made a document click event which checks if the popup is "active" and depending on event.target make the popup to dissapear or stay :)
0
Please log in to post a comment
Log in with GitHubJoin 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