2

I am creating a web app. I was testing it on a mobile browser and noticed that :active pseudo class doesn't really work. How should I simulate clicks for a mobile browser? I'm specifically interested for Android and iPhone.

I am using css sprites. I stumbled upon ontouchstart but don't know how to use that. Can anyone help me over it?

1
  • just a thought, you're already using jQuery, have you looked at jQuery Mobile?
    – SpYk3HH
    Feb 8, 2012 at 17:00

1 Answer 1

1

There seems to be an answer for your question on SO:

https://stackoverflow.com/questions/4940429/how-to-simulate-active-css-pseudo-class-in-android-on-non-link-elements

Even though the most upvoted answer has not been selected as THE answer by the poster, it seems to me that it is a valid solution for your problem. Also, the author indicates that the solution works on Iphone and Android.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.