首页>>表单>>鼠标经过显示的下拉菜单式复选框(2016-08-29)

鼠标经过显示的下拉菜单式复选框

鼠标经过显示的下拉菜单式复选框
赞赏支持
立刻微信赞赏支持 关闭

 

JavaScript Code
  1. <script type="text/javascript">  
  2.         $(function(){  
  3.             $('#example_follow_btn').appendHoverDropdownBox({  
  4.                 title: 'Follow',  
  5.                 items: {  
  6.                     "List A": {  
  7.                         color: "#e74c3c",  
  8.                         inputType: "checkbox",  
  9.                         inputChecked: true  
  10.                     },  
  11.                     "List B": {  
  12.                         color: "#f1c40f",   
  13.                         inputType: "checkbox",  
  14.                         inputChecked: false  
  15.                     },  
  16.                     "List C": {  
  17.                         color: "#2ecc71",  
  18.                         inputType: "checkbox",  
  19.                         inputChecked: false  
  20.                     },  
  21.                     "List D": {  
  22.                         color: "#3498db",  
  23.                         inputType: "checkbox",  
  24.                         inputChecked: false  
  25.                     },  
  26.                     "List E": {  
  27.                         color: "#7f8c8d",  
  28.                         inputType: "checkbox",  
  29.                         inputChecked: false  
  30.                     },  
  31.                 },  
  32.                 onChange: function(key, item, value){  
  33.                     window.alert("onChange: " + key + " - " + value );  
  34.                 },  
  35.                 onLabelClick: function(key, item){  
  36.                     item.checked( !item.checked() );  
  37.                 }  
  38.             });  
  39.         });  
  40.         </script>  
XML/HTML Code
  1. <span id="example_follow_btn" class="btn">Follow</span>  

 


原文地址:http://www.freejs.net/article_biaodan_582.html