Ken• 935
@kenreibman
Posted
Great job! The style looks great.
I would say the only issue with your component challenge here is that your share button is improperly functioning. I am also going to suggest better js code for the share button.
- Instead of adding a
style.display
on each element, it would be better if you toggled your classes. - In your
style.css
I would make a class called.show
or.active
or any name that indicates an active state with adisplay: flex;
property. - Then make a
click
event listener for yourshareBtn
shareBtn.addEventlistener('click', () => {
social.classList.toggle('active')
});
This would also, I believe fix the fact that your social button disappears, denying the user from closing the social pop-up as well.
I hope this helps! Please let me know if you have any questions.
Marked as helpful
0