我正在尝试从这里http://filamentgroup.com/lab/jquery_ui_selectmenu_an_aria_accessible_plugin_for_styling_a_html_select/实现ui.selectmenu,但是将它放在jQuery对话框中。不确定这是否是冲突所在。
HTML标记是:
<div id="selModeBox" title="Mode selection Form">
<label for="mode">Select modes:</label>
<select id="mode" name="mode">
<option value="v0" selected="selected">-- Make a Selection --</option>
<option value="v1">Mode 1.</option>
<option value="v2">Mode 2.</option>
</select>
</div>
要实施的Javascript:
jQuery(document).ready(function() {
$('#selModeBox').dialog({
modal: true
});
$('#selModeBox select').selectmenu();
$('#tabs').tabs();
});
加载时出现javascript错误a指的是ui.selectmenu javascript代码的这一行(第108行):
this.element.click(function() {
this._refreshValue();
}).focus(function() {
this.newelement[0].focus();
});
有没有人经历过类似的事情或对此有任何想法?
答案 0 :(得分:0)
jQuery 1.8可能因为尚未测试而导致问题,请参阅https://github.com/fnagel/jquery-ui/issues/261
如果问题在1.7.x中仍然存在,请打开一个新问题(请参阅https://github.com/fnagel/jquery-ui/issues/61)