Code Monkey home page Code Monkey logo

selectmenu's Introduction

SelectMenu

Simple、easy、diversity menu solution

简体中文文档

Docs、Demo、Guide

Explorer on

If you think the project is also good, please add a Star to the project to support the work of the author, Thank you

Plugin Preview

Regular menu mode

SelectMenu1

Advanced menu mode

SelectMenu2

Advanced menu mode (multiple group data)

SelectMenu3



Key Features

  • a jQuery plugin
  • simple style interface, can adapt to most UI environments
  • quick search item by input autocomplete
  • multiple group data used tabs form to show
  • use keybord to quick navigate and selection
  • multiple select item in advanced menu mode
  • used static data type or dynamic data to be menu data source
  • used mouse right button click to called menu
  • i18n support
  • rich setting parameters
  • brower supper IE8+,chrome,firefox

License

MIT



How

Install

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

Usage

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

  • jQuery library (1.6.0+), untest on jquery2.x & 3.x
  • The JavaScript file selectmenu.js (or its minified version selectmenu.min.js)
  • The css file selectmenu.css

Including files

<!-- 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 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
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.