Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question
    
just a thought, you're already using jQuery, have you looked at jQuery Mobile? –  SpYk3HH Feb 8 '12 at 17:00

1 Answer 1

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

http://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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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