Home

Awesome

<br><br><br>

<p align="center"> <a href="https://terryz.github.io/selectmenu/" target="_blank"> <img src="https://terryz.github.io/image/logo/SelectMenu.png" alt="SelectMenu" > </a> </p>

<br><br><br>

<p align="center"> Simple, easily and diversity menu solution </p> <p align="center"> <a href="https://travis-ci.org/TerryZ/SelectMenu"><img src="https://travis-ci.org/TerryZ/SelectMenu.svg?branch=master"></a> <a href="https://www.npmjs.com/package/selectmenu"><img src="https://img.shields.io/npm/v/selectmenu.svg"></a> <a href="https://www.npmjs.com/package/selectmenu"><img src="https://img.shields.io/npm/dy/selectmenu.svg"></a> <a href="https://mit-license.org/"><img src="https://img.shields.io/badge/license-MIT-brightgreen.svg"></a> <a href="https://www.npmjs.com/package/selectmenu"><img src="https://img.shields.io/badge/language-javascript%20%2F%20jquery-blue.svg"></a> </p>

<br><br><br><br><br>

Examples and Documentation

Explorer on

简体中文文档

The Vuejs version: v-selectmenu

Plugin Preview

Regular menu mode

SelectMenu1

Advanced menu mode

SelectMenu2

Advanced menu mode (multiple group data)

SelectMenu3

Key Features

License

MIT

Installation

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

or use NPM

npm i selectmenu

Usage

As you can see in the Demo Page, you will need to include:

Including files

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

<link rel="stylesheet" href="selectmenu.css" type="text/css">
<script type="text/javascript" src="selectmenu.js" >< /script>

HTML element set

<!--
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 init plugin

//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
})