在线实例
使用方法
手风琴ul li列表
<ul class="accordion">
<li>
<img src=#"/>
<div class="caption">超帅的中文响应式网络公司网页模板</div>
</li>
...
</ul>
$(document).ready(function() {
accordion = $('.accordion').classicAccordion({width: 1200, height: 400, slideshow: true, shadow: true, alignType: 'centerCenter', closedPanelSize: 40,
panelProperties: {
0: {captionWidth: 200, captionHeight: 35, captionTop: 30, captionLeft: 30},
2: {captionWidth: 380, captionHeight: 40, captionTop: 330, captionLeft: 30},
4: {captionWidth: 150, captionHeight: 120, captionTop: 270, captionLeft: 600},
7: {captionWidth: 300, captionHeight: 35, captionTop: 180, captionLeft: 250},
8: {captionWidth: 380, captionHeight: 40, captionTop: 330, captionLeft: 30},
10: {captionWidth: 150, captionHeight: 120, captionTop: 30, captionLeft: 620}
}
});
accordion.openPanel(0);
});
参数详解
参数 |
描述 |
默认值 |
captionWidth |
标题宽度 |
300 |
captionHeight |
标题高度 |
100 |
captionTop |
标题顶部距离 |
100 |
captionLeft |
标题左侧距离 |
30 |
shadow |
是否显示阴影层 |
true |
linkTarget |
打开链接方式,默认新窗口 |
_blank |
openPanelDelay |
打开延迟时间 |
200 |
orientation |
手风琴方向,有horizontal和vertical |
horizontal |
width |
手风琴宽度 |
500 |
height |
手风琴高度 |
300 |
alignType |
对其方式 |
leftTop |
distance |
间隔距离 |
0 |
slideshow |
开启滑动效果 |
false |
slideDuration |
滑动延时时间 |
700 |
openPanelOnMouseOver |
鼠标悬浮打开 |
true |
closePanelOnMouseOut |
鼠标离开关闭 |
true |
openPanelOnClick |
鼠标点击打开 |
false |