4 ms·
Especially considering that you can't hover in mobile phones or tablets.
by ricardobeat 14y ago
Especially considering that you can't hover in mobile phones or tablets.
- dasil003 14y agoWhich is what I thought this article would be about based on the title.
- dutchbrit 14y agoWell, 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.