Click here to Skip to main content
Sign Up to vote bad
good
See more: JavascriptCSS
On CodeProject.com we use CSS :hover pseudo-class on A tags for menu dropdowns. It's fast, it requires no script execution to set up, and it works when Javascript isn't enabled or available.
 
However, for mobile devices and pads that use a touchscreen there is no mouse over or hover event so this design fails.
 
What's a good alternative to this that doesn't rely on Javascript?
 
1. Simply not show menus and just have links that go to pages that have the options that would have appeared in the menu dropdown?
 
2. Use the :active pseudo-class and work out how to make the link reference a bookmark on the page instead of an off-page link?
 
3. Use a SELECT control with OPTIONs for each item in the menu. Some mobile devices have excellent support for these.
 
4. Liquid Nitrogen?
Posted 16 Mar '11 - 3:25
Edited 16 Mar '11 - 4:08

Comments
OriginalGriff - 16 Mar '11 - 10:01
I'm in two minds here: I really like the feature on my desktop, but on the mobile there really isn't a lot of screen real estate, so anything which did manage to do this would probably be a PITA in practice. I'd be tempted by just links to option pages, to be honest - it may be slower to navigate, but I tend to set bookmarks to the various fora anyway, so once I'm there it doesn't matter again.

1 solution

OnFingerHover? Smile | :)
 
I think I'd go with option 3, except you made it a point to say "some" devices, as if to say *some* device DON'T have suppport (or excellent support) for it.
 
BTW, Liquid Nitrogen is in short supply because of the Tsunami in Japan.
  Permalink  
Comments
Chris Maunder - 16 Mar '11 - 11:13
*cough* blackberry *cough*
Yusuf - 16 Mar '11 - 11:42
Ok which finger are we talking about :-)
SAKryukov - 16 Mar '11 - 21:59
Hovering middle finger detected! --SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 355
1 Sergey Alexandrovich Kryukov 338
2 Arun Vasu 315
3 Maciej Los 208
4 Aarti Meswania 180
0 Sergey Alexandrovich Kryukov 9,755
1 OriginalGriff 7,549
2 CPallini 4,018
3 Rohan Leuva 3,362
4 Maciej Los 2,951


Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 16 Mar 2011
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid