Author: | Justin McCandless (www.justinmccandless.com) |
Demo/Metrics: | http://www.justinmccandless.com/demos/jquery.mobile.fastButtons/index.html |
Latest Blog Post: | http://justinmccandless.com/blog/jQueryMobile+Plugin+to+Improve+iOS+Click+Speed |
jQuery: | 1.6.4+ |
jQuery Mobile: | 1.0.1+ |
Contact: | justinjmccandless@gmail.com |
This jQuery Mobile plugin makes click events faster, especially on iOS. By default in jQuery Mobile buttons the 'click' event is used. This event has a significant delay in iOS in order to distinguish it from other events. In native apps, however, clicking a button happens significantly faster. So, this plugin simply replaces 'click' events on document with jQuery Mobile's much faster 'vclick'.
Simply include this file after the jQuery Mobile javascript file and you're good to go!
Included in the repository are two html files. These allow you to compare the response times of 'click' and 'vclick' in whatever browser you use, as well as to try a jQuery Mobile page transition with and without jquery.mobile.fastButtons. I encourage you to try them out on your own devices to see the kind of speed increases you can expect, but I've included some of my own data below to put things into perspective.
Environment | 'click' Response Time (ms) | 'vclick' Respnse Time (ms) |
Firefox 17.01, Linux | 6 | 7 |
Firefox 17.01, Linux | 5 | 6 |
Firefox 17.01, Linux | 7 | 9 |
Mobile Safari, iOS 6.0 iPhone Simulator | 402 | 48 |
Mobile Safari, iOS 6.0 iPhone Simulator | 410 | 56 |
Mobile Safari, iOS 6.0 iPhone Simulator | 434 | 80 |