一款切换accordion展开关闭手风琴菜单,可直接定义到第几个菜单的风琴组件使用CSS3转换。
基础调用方法
var accordion = new Accordion('.Example');配置参数
var accordion = new Accordion('.Example',{ // 元素配置 item: '.item', target: '.target', control: '.target', panel: '.panel', // 允许多个块同时打开 allowMultiple: true, // 默认属性 attribute: 'data-status', // 默认值状态 expanded: 'expanded', contracted: 'contracted', // CSS prefix: 'Accordion-', // 配置css过渡效果 transition: 'height .3s', });常用API方法
// 切换到第几个 accordion.activate(index); // 展开第几个 accordion.expand(index); // 合并第几个 accordion.contract(index); // 合并所有 accordion.contractAll(index); // 销毁 accordion.destroy();
accordion展开关闭手风琴菜单
正在加载文件目录...
- 热度 13
![](https://imgs.bootstrapmb.com/2021/10/130911276.jpg)
·下载了 此素材
![](https://imgs.bootstrapmb.com/2023/3/300440485.jpg)
Gavin_R_ong下载了 此素材
![](https://imgs.bootstrapmb.com/2022/7/210850135.jpg)
L下载了 此素材
![](https://imgs.bootstrapmb.com/2019/4/180847044.jpg)
ID14938下载了 此素材
![](https://imgs.bootstrapmb.com/2022/4/260321498.jpg)
小黄猫下载了 此素材
![](https://imgs.bootstrapmb.com/2022/8/211159423.jpg)
PPLIVEQQ下载了 此素材
![](https://imgs.bootstrapmb.com/2021/12/100302153.jpg)
看戏仔下载了 此素材
![](https://imgs.bootstrapmb.com/2019/8/120608443.jpg)
持久战191下载了 此素材
![](https://imgs.bootstrapmb.com/2020/2/151216499.jpg)
天边下载了 此素材
![](https://imgs.bootstrapmb.com/2021/3/160429544.jpg)
我是传琪下载了 此素材