Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi,
I have a website with some content inside.
The most interesting is some div element with defined onclick (redirect to other page) and onmouseover ( show small information over it) methods.
However there is no mouseover on mobile browsers.
 
What are the best practices for implementing such design for mobile web browsers?
Posted 28-Jan-13 5:24am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Using some library that addresses these concerns, for example JQuery mobile does:
http://jquerymobile.com/demos/1.1.0-rc.1/docs/api/events.html[^]
 
Rethinking your application behavior - for example, replacing on mouseover with separate handling of first and second click if you are on mobile device.
  Permalink  
Comments
serhiy.semenyuk at 28-Jan-13 15:20pm
   
thanks for the jQuery.mobile plugin - I'll check that.
Although is it common experience for mobile web sites to have first & second click?
Vyacheslav Voronenko at 28-Jan-13 15:22pm
   
This is one of approaches that could be used to make, for example, menu usable on touch device
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Although its not native to mobile web sites to have hover menus from what I've found the most reasonable way to show something similar is to use taphold (click + hold) event. So on simple touch do action, and on touch + hold - show something else.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 554
1 Gihan Liyanage 298
2 ChintanShukla 295
3 RyanDev 250
4 Richard Deeming 250
0 Sergey Alexandrovich Kryukov 8,906
1 OriginalGriff 7,601
2 CPallini 2,603
3 Richard MacCutchan 2,121
4 Abhinav S 1,923


Advertise | Privacy | Mobile
Web01 | 2.8.140827.1 | Last Updated 31 Jan 2013
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