`

jquery.multi-select.js操作

阅读更多
       $('#searchCity').multiSelect({
//            selectableOptgroup: true,//Click on optgroup will select all nested options when set to true.
//            keepOrder: true,
            afterSelect: function(values){
            	console.log("values:"+values.toString());
            	$.each(values,function(i,v){
            		if($.inArray(v,selectItem)<=-1){
            			selectItem.push(v);
            		}
            	});
            	console.log("afterSelect:"+selectItem.toString());
              },
          afterDeselect: function(values){
        	  selectItem.splice($.inArray(values,selectItem),1);
          }
        });

//最简单的使用方法
$('#searchCity').multiSelect();

//更多内容请看附件,附件中附有网页demo
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics