我正在使用Jquery Mobile显示选择框的下拉菜单。如何在jQuery Mobile中的选择框中禁用打开下拉菜单
<select id="category_type" multiple="multiple" class="category" tabindex="-1" placeholder="Category">
<option></option>
.
.
</select>
在某些情况下,我需要限制单击时打开选择框的下拉菜单。
我试着用
jQuery("#category_type").bind("change", function(e) {
jQuery.mobile.selectmenu.prototype.options.hidePlaceholderMenuItems = false;
e.preventDefault();
});
但没有效果。 怎么可能? 在此先感谢
你是什么意思,限制开放? – Omar 2014-11-24 06:50:13
@Omar感谢您的回复。我其实是指在点击选择菜单时禁用或阻止选项列表。我不需要显示在选择框中单击时填充的选项列表,但风格和所有需要我。 – 2014-11-24 06:54:05
禁用它http://stackoverflow.com/a/19682317/1771795 – Omar 2014-11-24 07:31:05