jQuery mobile button press event slow to process

前端 未结 4 1760
死守一世寂寞
死守一世寂寞 2020-12-11 10:18

It seems like whenever I press an input button or anchor button on a mobile device, it takes a second or two to process the onclick or press event. Is there a way to speed

4条回答
  •  甜味超标
    2020-12-11 10:48

    From 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).

    For example:

    $( document ).bind( "mobileinit", function() {
        $.mobile.buttonMarkup.hoverDelay = 500
    });
    

提交回复
热议问题