jquery-ui 的selectmenu-api配置option参数时报错!
本文介绍了jquery-ui 的selectmenu-api配置option参数时报错!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
chrome debug提示:
Uncaught Error: cannot call methods on selectmenu prior to initialization; attempted to call method 'option'
我的代码是这么写的:
$( "#speed" ).selectmenu("option",{
width:200
});
为什么会有这个报错,有谁知道吗?
解决方案
这么着试试呢?
$('#speed').selectmenu()
.selectmenu("option",{
width:200
});
这篇关于jquery-ui 的selectmenu-api配置option参数时报错!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文