Git Product home page Git Product logo

bootmenu's Introduction

Bootmenu

Simple jQuery animated searchable select menu based on bootstrap framework.

Demo

Installation

Add [bootmenu.min.js] to your project.

<script src='bootmenu.min.js'></script>

Bootmenu is also available via npm
$ npm install --save bootmenu

Basic usage

$("div").bootmenu({ parameters });

Ideas

  • Bind two select menus on the callback to make a nested one.
<div id="selectMenu"></div>
<div id="selectMenu2"></div>
$("#selectMenu").bootmenu({
      callback: function(value1) {
          alert(value1);
          $("#selectMenu2").bootmenu({
              listName: "MenuTwo",
              callback: function(value2) {
                  alert(value2);
              }
          });
      }
 });

Configuration

items

Array of items to be added to the list. (default: Please add items to the dropdown!)

var food = new Array('Pizza', 'Meat', 'Melon', 'Chicken', "Lasagna", "Eggs");
$("#selectMenu").bootmenu({ items : food });

defaultText

The default placeholder text to display. (default: Select here!)

$("#selectMenu").bootmenu({ defaultText : "Choose your preferences" });

listname

A unique identifier for each select menu, if you're using more than one menu. (default: listOne)

$("#selectMenu").bootmenu({ listname : "secondmenu" });

background and hoverColor

The background color of menu and the hover color of the items. (default: #3498DB and #2C3E50)

$("#selectMenu").bootmenu({ background : "#000", hoverColor: "#fff" });

listAnimation

The animation effect when clicking the select menu. (default: slideDown)
Available animations: rotation, slideDown, fade, slideLeft, rotate, fly,

$("#selectMenu").bootmenu({ listAnimation : "rotation" });

animationDuration

Duration of the animation when clicking the menu. (default: 500ms)

$("#selectMenu").bootmenu({ listAnimation : "fly", animationDuration: 1000 });

Callback

$("#selectMenu").bootmenu({
    callback: function(selectedValue)
    {
         // do something
    }
});

Thanks

Bootmenu © 2016-2017.

GitHub @mariomed7at  · 

bootmenu's People

Contributors

imgbotapp avatar m-z avatar

Watchers

 avatar

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.