当我添加用于设置 Select 或 Multi-Select 元素样式的插件/小部件(Dropkick - http://jamielottering.github.com/DropKick/和 jQuery UI MultiSelect Widget http://www. erichynds.com/jquery/jquery-ui-multiselect-widget/ ) :-(
知道如何解决这个问题吗?
我在将插件添加到小提琴时遇到了一些麻烦,所以我创建了单独的小提琴: http: //jsfiddle.net/chayanyc/Dhaat/201/ - 有效的功能 http://jsfiddle.net/chayanyc/vWLEn/89/ - Dropkick 样式的 Select 元素的功能(不起作用) http://jsfiddle.net/chayanyc/3jr2v/69/ - UI MultiSelect Widget 样式的 Multi-Select 元素的功能(不起作用)
var $increase_priority1 = $(".increase_priority1");
$(".trigger_rank1, .complaint select").change(function () {
var name = $(this).data("name"); 
if ($("#Shoulders select").val() === "Too_small" && $(this).val() == 1 && !$(this).data("increase_priority1")) {
    $("<option>", {
        text: name,
        val: name
    }).appendTo($increase_priority1);
    $(this).data("increase_priority1", true); 
}    
if ($(this).data("increase_priority1") && $(this).val() != 1) {
    $("option[value=" + name + "]", $increase_priority1).remove();
    $(this).removeData("increase_priority1");
}
});