DEV Community

Discussion on: The Web I Want

Collapse
 
quii profile image
Chris James • Edited

Hey!

A lot of drop-down menus do suck a fair bit on mobile, so tread with caution. If you do need JavaScript how will users without JavaScript use your site? Maybe a drop-down menu isn't the way.

Let's imagine you're set on having a dropdown menu anyway!

I don't know a way how to do it without JS either (that's not to say there isn't a way) so in your case I'd write a little Javascript.

Just to be clear, a lot of people are misinterpreting me (or miscommunication on my part) in saying never use javascript. Feel free to use it, if it's really needed and think about the consequences of it.

Overall my main objection is to large amounts of javascript ruining perfectly good content for lots of users when it wasn't really needed in the first place.

Collapse
 
briankephart profile image
Brian Kephart

You can do dropdowns with CSS transformations. Wish I had a good example, but the app I'm doing now is behind a login.

Thread Thread
 
quii profile image
Chris James

Sounds like an excellent idea for a post here :)

Thread Thread
 
briankephart profile image
Brian Kephart

I'm thinking about it, but I'm not yet convinced I wouldn't just be repeating something posted elsewhere. Looking around though, it looks like I combined approaches that I found in other posts, so it might be worthwhile.