【发布时间】:2014-05-19 06:50:53
【问题描述】:
我正在使用 selectboxit 插件 - http://gregfranko.com/jquery.selectBoxIt.js/
对于普通的 select 元素,设置 selected 元素的 prop 将更新 UI。使用 selectboxit 无法正常工作。
演示 - http://jsfiddle.net/uXM6Y/
var selectBox = $("select#test").selectBoxIt().data("selectBoxIt");
$('.btn').click(function(e){
$('#test option:contains("Great")').prop('selected', true);
});
当我单击演示中的更新按钮时,选择未设置为更新的值。如果我删除 selectboxit 插件,它工作正常。
【问题讨论】:
标签: javascript jquery jquery-plugins jquery-selectbox