Buttons on my PhoneGap app using jQuery Mobile respond only after a few seconds that I tapped on the button. Same goes if I replace tap with click events. How do I speed it up? Or if it’s not possible, how do I simply make it so that when the user taps on the button, the button’s styling is changed instantaneously (a.k.a. let the user know that they have already pressed the button successfully). This is to prevent them from constantly tapping on the button thinking it didn’t work.
I know I saw a thread around here detailing exactly how to do that but I can’t find it anymore.
There is a delay with the click event on iOS that you can avoid by binding to vclick or tap instead of click. For buttons without custom event handlers, search for jquery mobile fastbutton.
However, that delay is 300ms – noticeable, but not the few seconds you are seeing so you probably have another issue on top of that.
Using setTimeout in your event handlers may help – the active button style won’t render if the app is busy with the click handler.