What we've done on our site to retro-fit it for mobile is add some Javascript that targets mobile devices and adds "click" actions to hover events.
So, something like:
Code:
.this:hover { display: block }
I change to:
Code:
.this:hover, .this.active { display: block }
and then I add some JS like this (using jQuery for clarity):
Code:
if( strstr($_SERVER['HTTP_USER_AGENT'],'Android') ||
strstr($_SERVER['HTTP_USER_AGENT'],'webOS') ||
strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') ||
strstr($_SERVER['HTTP_USER_AGENT'],'iPod')
){
$('.this').click(function() {
$('.active').removeClass('active');
$(this).addClass('active');
// Hide it again when anything else is clicked.
$(document).click(function() {
$('.active').removeClass('active');
$(document).unbind('click');
});
});
}
The other biggie for desktop to mobile is scrolling within elements. It just doesn't work (like a div with overflow: auto). For these, I recommend just making a mini-page and redirecting mobile sites to those (if the scroll part shows up on click or hover). If it's always there, you have bigger problems and I recommend getting rid of it in general.
Bookmarks