我有一个基于复选框的选项列表,我想限制选项列表的选择。我想从 targetList 中删除这些项目或限制它在那里填充。
$("#source-catalogue").pickList({
sourceListLabel : "Source Catalogue",
targetListLabel : "Source Fields",
addAllLabel : "â–ºI",
addLabel : "â–º",
removeAllLabel : "Iâ—„",
removeLabel : "â—„",
sortItems : false,
beforeAdd: function(){
if(ConfigGlobals.reOrderFlag){
tmpList = $('#source-container ul.pickList_targetList li');
alert("Please uncheck mycheckbox and then try");
}
},
afterAdd: function(){
if(ConfigGlobals.reOrderFlag){
curLen = $('#source-container ul.pickList_targetList li').length
diff = curLen - tmpList.length
// remove the selection
}
},