Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery ui 将选项动态附加到select中不起作用_Jquery Ui - Fatal编程技术网

Jquery ui 将选项动态附加到select中不起作用

Jquery ui 将选项动态附加到select中不起作用,jquery-ui,Jquery Ui,DDL没有使用新的选项集刷新 $(“#selectid”).live('change',function(){ 如果($('option:selected',$(this)).text()='--Next 50--'){ var current50th=(parseInt($(this.val())-1); var Upper五十=parseInt(当前五十+50); var系数=“”; 对于(var i=当前50;i

DDL没有使用新的选项集刷新

$(“#selectid”).live('change',function(){ 如果($('option:selected',$(this)).text()='--Next 50--'){

var current50th=(parseInt($(this.val())-1);
var Upper五十=parseInt(当前五十+50);
var系数=“”;
对于(var i=当前50;i<上限50;i++){
if(集合[i].ID!=null&&collection[i].ID!=“未定义”){
copions=copions+“”+集合[i]。Text+“”;
}
}
警报($(this.html());
$(此)。附加(选项);
$(this.append($(“”).val((大写50+1)).html(“--Next 50--”);
var allhtml=($(this.html());
$(this.trigger('refresh');
}
});
                var currentFifty = (parseInt($(this).val()) - 1);

                var upperFifty = parseInt(currentFifty + 50);

                var cOptions = '';

                for (var i = currentFifty; i < upperFifty; i++) {

                    if (collection[i].ID != null && collection[i].ID != "undefined") {
                        cOptions = cOptions + "<option value=" + collection[i].ID + ">" + collection[i].Text + "</option>";

                    }


                }

                alert($(this).html());

                $(this).append(cOptions);

                $(this).append($("<option></option>").val((upperFifty + 1)).html("--Next 50--"));

                var allhtml = ($(this).html());

                $(this).trigger('refresh');



            }
        });