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:
執行結果:
寫了
5860316篇文章,獲得
23313次喜歡