【问题标题】:Using jquery CascadingDropDown with jquery selectbox使用 jquery CascadingDropDown 和 jquery 选择框
【发布时间】:2013-06-02 11:44:19
【问题描述】:

如何将 jquery CascadingDropDown 与 jquery selectbox 一起使用?

【问题讨论】:

  • 我知道您提出这个问题是为了自己回答,但您仍然需要编写可能的问题供其他人回答。事实上,您的问题太模糊了,并且缺少任何“您尝试过什么”代码来向我们展示您需要修复的内容。

标签: jquery cascadingdropdown jquery-selectbox


【解决方案1】:

要使用 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');
    }
},

希望对你有帮助

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-07-20
    • 2012-11-21
    • 2011-01-27
    • 1970-01-01
    • 2014-05-24
    • 2018-05-14
    • 2015-02-21
    • 1970-01-01
    相关资源
    最近更新 更多