3C科技 娛樂遊戲 美食旅遊 時尚美妝 親子育兒 生活休閒 金融理財 健康運動 寰宇綜合

Zi 字媒體

2017-07-25T20:27:27+00:00
加入好友
李炎恢_PHP_jQuery EasyUI[013] ~ Accordion(分類)組件 [Web Outlook菜單] 參考資料: https://github.com/jash-git/jash-WebSI GITHUB: https://github.com/jash-git/richie_jQuery_EasyUI My code: $(function () { $('#box').accordion({ //width : 500, //height : 300, //fit : true, //border : false, //animate : false, //multiple : true, //selected : 1, /* onSelect : function (title, index) { alert(title + '|' + index); }, onUnselect : function (title, index) { alert(title + '|' + index); }, onAdd : function (title, index) { alert(title + '|' + index); }, onBeforeRemove : function (title, index) { alert('before' + title + '|' + index); }, onRemove : function (title, index) { alert('' + title + '|' + index); }, */ }) //console.log($('#box').accordion('panels')); //console.log($('#box').accordion('panels')); /* $(document).click(function () { $('#box').accordion().show(); $('#box').accordion('resize'); }); //console.log($('#box').accordion('getSelected')); $(document).click(function () { console.log($('#box').accordion('getSelections')); }); */ //console.log($('#box').accordion('getPanel', 1)); //console.log($('#box').accordion('getPanelIndex', '#a2')); //$('#box').accordion('select', 1); //$('#box').accordion('unselect', 0); /* $('#box').accordion('add', { title : '新面板', closable : true, content : '新内容', onClose : function () { alert('close'); }, //selected : false, //collapsible : false, }); */ //$('#box').accordion('remove', 0);//移除第一個選單 }); jQuery Easy UI accordion1 accordion2 accordion3 PDF: 執行結果:

本文由jashliaoeuwordpress提供 原文連結

寫了 5860316篇文章,獲得 23313次喜歡
精彩推薦