似乎每当我在移动设备上按下输入按钮或 anchor 按钮时,都需要一两秒钟来处理 onclick 或 press 事件。有什么办法可以加快速度吗?
我在 Android 设备上使用 Phonegap + jQuery Mobile,在 iOS 上似乎快一点
最佳答案
来自 http://jquerymobile.com/demos/1.2.0/docs/pages/phonegap.html
$.mobile.buttonMarkup.hoverDelay
If you find that the button down/hover state (lists, buttons, links etc) feels sluggish the $.mobile.buttonMarkup.hoverDelay setting might be of use. It will decrease the time between the touch event and the application of the relevant class but will also result in a higher chance that the same class will be applied even when the user is scrolling (eg, over a long list of links).
例如:
$( document ).bind( "mobileinit", function() {
$.mobile.buttonMarkup.hoverDelay = 500
});
关于android - jQuery 移动按钮按下事件处理缓慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16630129/