在用这样的multipleSelect调用这个函数时,我使用了ajax函数。假设我有一个函数在ajax加载页中再次调用
我还包括了jquery和jquery.multiselect.js包含文件。
$('#demo3').multipleSelect({
placeholder: "Select Country",
filter:true
});
$("#button").click(function(){
$.ajax({
url:"http:localhost/mydata",
success:function(data){
$('#demo4').multipleSelect({
placeholder: "Select Country",
filter:true
});
},
});
});demo3已经成功地生成了多选择函数。但是当我按下按钮时,demo4中的代码出现了错误,即多选择函数没有在页面中注册?
错误代码说..。Uncaught TypeError: Object [object Object] has no method 'multipleSelect'
我怎么能解决这个问题?谢谢
发布于 2013-09-28 15:04:30
我认为您需要multiSelect,除非您已经定义了自己的jquery插件函数,或者为multipleSelect使用了其他插件。
$('#demo3').multiSelect({
placeholder: "Select Country",
filter:true
});这之后还有一个额外的});。不确定你是否需要这个。
https://stackoverflow.com/questions/19068314
复制相似问题