iphone - :active pseudo-class doesn't work in mobile safari -


in webkit on iphone/ipad/ipod, specifying styling :active pseudo-class <a> tag doesn't trigger when tap on element. how can trigger? example code:

<style>  a:active {      background-color: red; } </style> <!-- snip --> <a href="#">click me</a> 

<body ontouchstart="">     ... </body> 

applied once, opposed every button element seemed fix buttons on page. alternatively use small js library called 'fastclick'. speed click events on touch devices , takes care of issue too.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -