【发布时间】:2013-06-02 11:44:19
【问题描述】:
如何将 jquery CascadingDropDown 与 jquery selectbox 一起使用?
【问题讨论】:
-
我知道您提出这个问题是为了自己回答,但您仍然需要编写可能的问题供其他人回答。事实上,您的问题太模糊了,并且缺少任何“您尝试过什么”代码来向我们展示您需要修复的内容。
标签: jquery cascadingdropdown jquery-selectbox
如何将 jquery CascadingDropDown 与 jquery selectbox 一起使用?
【问题讨论】:
标签: jquery cascadingdropdown jquery-selectbox
要使用 jquery CascadingDropDown 和 jquery 选择框插件,您需要在级联下拉列表中加载和重置事件后分离和附加:
在 jquery.cascadingDropDown.js 中进行以下更改:
reset: function () {
methods.clearItems();
$this.append($(optionTag)
.attr("value", "")
.text(config.promptText));
$this.trigger('change');
if ($this.attr('sb') != undefined) {
$this.selectbox('detach');
$this.selectbox('attach');
}
},
和
loaded: function () {
$this.removeAttr("disabled");
$this.trigger('change');
if ($this.attr('sb') != undefined) {
$this.selectbox('detach');
$this.selectbox('attach');
}
},
希望对你有帮助
【讨论】: