SelectMenu v2.1 - 简洁、易用、多样的菜单解决方案

2018-03-07 09:27:29 +08:00
 Terry05

多功能菜单插件 SelectMenu v2.1 发布了,插件更新内容:

插件简介

简洁、易用、多样的菜单解决方案

插件状态

入门指南、实例、文档

更多实例、文档请访问:

项目 GitHub 地址:SelectMenu

插件效果预览:

常规菜单模式

高级菜单模式

高级菜单模式 (多分组数据)

安装 / 下载

download SelectMenu plugin zip file by last release, or click me to download SelectMenu
or use NPM

npm install selectmenu

使用手册

插件文件引用

<!-- Basic environment reference -->
<!-- jQuery library include -->
<script type="text/javascript" src="jquery.min.js" >< /script>

<!-- SelectMenu style sheet -->
<link rel="stylesheet" href="selectmenu.css" type="text/css">

<!-- SelectMenu plugin js file include -->
<script type="text/javascript" src="selectmenu.js" >< /script>

HTML 元素设置

<!--
Set the trigger menu to open the object, where
only the most commonly used button as an example
-->
<button type="button" id="btnDemo">Select Menu</button>

Javascript 初始化

//defined data source
//data format:Array[{Object},{...}]
var data = [
    {id:1 ,name:'Chicago Bulls',desc:'芝加哥公牛'},
    {id:2 ,name:'Cleveland Cavaliers',desc:'克里夫兰骑士'},
    {id:3 ,name:'Detroit Pistons',desc:'底特律活塞'},
    {id:4 ,name:'Indiana Pacers',desc:'印第安纳步行者'}
];
//initialize selectmenu
$('#btnDemo').selectMenu({
    showField : 'desc',
    keyField : 'id',
    data : data
});
1953 次点击
所在节点    分享创造
2 条回复
qfdk
2018-03-07 18:01:57 +08:00
似乎不错 马克
zhezhi
2018-03-07 22:31:06 +08:00
记号备用.

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/435616

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX