October 2, 2011

JQuery OnClick event on IPad

Recently, we have been doing some HTML5 and CSS3 development targeted at the IPad. One key thing we observed was the slow response time when using JQuery’s onClick event.

We resolved the issue by binding a specific IPad event, this then removed the click delay and now the app runs smooth as on the desktop.

$('.class').bind('touchend', function () {
//Code
});

Note : If your app is to run on the Desktop you still need to bind the .Click event for the desktop still. You can do this by first determining what device is viewing the app and calling the appropriate bind.