@Alex-Archer-I
Posted
Hey, another challenge, congrats!
I prefer querySelector
, seems to me a bit more flexible =)
Genuine question: is there some advantages to use js resize vs media queries or you just wanted to practice it?
Marked as helpful
@porumbachanov
Posted
@Alex-Archer-I In all honesty, it didn't even occur to me to just add a few more classes and use media queries xDD. I wrote the html and css first so when I was writing the js and it came to the resizing problem, I just googled how to do it the js way. Doing it with media queries seems more efficient as it spares an event listener and the js would be cleaner. I knew something was off but don't know what stopped my brain from working xD, thanks for pointing it out!
@Alex-Archer-I
Posted
@Vrondir
Oh, I see. Well, it's cool to practice new thing anyway =)
By the way, you skip a couple of semantic tags - the clickable arrow should be a button and the links inside - an ul
=)
And I really like smooth animation of the links pop-up and that they could be closed by clicking anywhere. I tried to figure out how to do it in the another challenge and failed (but there was react app) =)