3 ms·
Well, mainly because you can only "touch/click". You can replicate a hover though, saying the hover goes on when you touch, and goes off when you release. For
by dutchbrit 14y ago
Well, mainly because you can only "touch/click". You can replicate a hover though, saying the hover goes on when you touch, and goes off when you release.
For example:
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i)) || (navigator.userAgent.match(/Android/i))) {
$("a").bind('touchstart', function(){
$(this).addClass('hover');
});
$("a").bind('touchend', function(){
$(this).removeClass('hover');
});
}
This should work in theory.