本文介绍了减少在jquery mobile中选择选项时的延迟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我将我的应用程序安装在使用Intel XDK构建的Android设备 Samsung S4 上.我在具有 40个选项的表单中有一个选择下拉列表.当我点击一个选项进行选择时,它会立即选择该选项,但是要花费2秒的延迟才能关闭已打开的选项弹出窗口.

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?

推荐答案

尽管这对我不起作用

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

但是在选择元素中添加data-native-menu="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">

这篇关于减少在jquery mobile中选择选项时的延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 23:34