I've appended a div with a html button:
$('.nav').append('<button class="restart">Restart</button>');
The button has css properties for hover. My problem is that when tapping the button on a touch-screen device, the button retains its hover state until another element is tapped.
Is there any way that the hover property can be ignored when browsing with a touch-screen device?
I came across this exact problem recently, iOS seems to consider the hover psuedo as an additional click, so links will needs clicking twice etc.
If you use modernizr you can apply your :hover psuedos through the .no-touch class which is applied to the html tag.
so:
html a { color:#222; }
html.no-touch a:hover { color:#111; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With