Reduce delay while selecting option in jquery mobile

佐手、 提交于 2019-12-12 01:03:19

问题


I have my application installed on an Android Device Samsung S4 which is built using Intel XDK. I have a select dropdown in the form having 40 options. When i tap on an option to choose, it chooses the option instantly but takes 2 seconds of delay before closing the opened options popup.

I have tried the following fix but it did not work as expected.

$(document).bind("mobileinit", function(){
    $.mobile.buttonMarkup.hoverDelay = 0;
    $.mobile.selectmenu.prototype.options.nativeMenu = true; //i also changed to false and didn't work either
});

Is there any other fix i can apply to reduce or remove the lag between choosing an option and closing the option box?


回答1:


Although this didn't work for me

$.mobile.selectmenu.prototype.options.nativeMenu = false;

But adding data-native-menu="false" to the select element it worked fine

<select name="year" id="year" data-theme="a" data-native-menu="false">


来源:https://stackoverflow.com/questions/20977918/reduce-delay-while-selecting-option-in-jquery-mobile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!