首页 > 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
    });
【热门文章】
【热门文章】