简体   繁体   English

jQuery mobile-选择菜单不会刷新显示值

[英]Jquery mobile - Select Menu doesn't refresh the display value

I am trying to use a pick list in my mobile App using Select Menu. 我正在尝试使用“选择菜单”在移动应用中使用选择列表。 I have picked up below example from jquerymobile website. 我已经从jquerymobile网站获取以下示例。 It creates the popup list and shows the default first value (ie Standard: 7 day). 它创建弹出列表并显示默认的第一个值(即标准:7天)。 However if I use the popup to select a different value, say "Rush: 3 days", it doesn't update the display value. 但是,如果我使用弹出窗口选择其他值,例如说“ Rush:3 days”,它不会更新显示值。 If I open it again I can see "Rush: 3 days" selected in the popup but the display value remains unchanged. 如果再次打开它,则可以在弹出窗口中看到“高峰:3天”,但显示值保持不变。

<label for="select-choice-min" class="select">Shipping method:</label>
<select name="select-choice-min" id="select-choice-min" data-mini="true" onchange="ChangeValue(this.value);">
   <option value="standard">Standard: 7 day</option>
   <option value="rush">Rush: 3 days</option>
   <option value="express">Express: next day</option>
   <option value="overnight">Overnight</option>
</select> 

I even tried to manually Refresh using onchange() which didn't work: 我什至尝试使用不起作用的onchange()手动刷新:

function ChangeValue (z) {

    $('#select-choice-min').selectmenu('refresh');

}

Here are a few screenshots: 以下是一些屏幕截图: 在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

JQuery: jquery-2.1.4.min.js JQM: jquery.mobile-1.4.5.min.js jQuery:jquery-2.1.4.min.js JQM:jquery.mobile-1.4.5.min.js

jQuery Mobile 1.4.5不能与jQuery 2 .XX完全兼容,如果可以尝试使用jQuery 1 .XX,则应该可以。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM