Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Javascript CSS
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 4:25am
Edited 16-Mar-11 5:08am
v2
Comments
OriginalGriff at 16-Mar-11 10:01am
   
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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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  
v2
Comments
Chris Maunder at 16-Mar-11 11:13am
   
*cough* blackberry *cough*
Yusuf at 16-Mar-11 11:42am
   
Ok which finger are we talking about :-)
SAKryukov at 16-Mar-11 21:59pm
   
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
0 OriginalGriff 277
1 DamithSL 225
2 Maciej Los 210
3 Richard MacCutchan 178
4 BillWoodruff 155
0 OriginalGriff 5,130
1 DamithSL 4,197
2 Maciej Los 3,670
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,821


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 16 Mar 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100