Giter Club home page Giter Club logo

multilist's Introduction

multiList

MultiList allows you to customize a selector(Use Select2(4.0.0)), wherein the selected traits are in a sortable list (Use Nestable2)

bower install multiList

Dependences

Getting started

you can create a MultiList in two ways:

    1. passing a query of an element
$('#asigned_terms3').multiList();
    1. passing a query multiple $('select').MultiMultiList().
$('.classAllSelect').multiMultiList();
$('select').multiMultiList();

Params

MultiList parameters:

  • orientation: Vertical or Horizontal
  • placeholder: String
  • icon: String html
  • itemActions: Array Objects{ id, html, action(function)}

Vertical lists ordering them selected from the top down. Horizontal shows another type of styles that allow you to sort horizontally.

Example:

$('#asigned_terms3').multiList({
  orientation: 'horizontal',
  placeholder: 'Select options',
  itemActions: [
    { 'id': 'edit', 'html': '<i class="fa fa-pencil-square-o"></i>', 'action': editCollection },
    { 'id': 'show', 'html': '<i class="fa fa-circle-thin"></i>', 'action': showCollection }
  ],
  'icon': '<i class="fa fa-arrows"></i>'
});

multiMultiList

If you create multiple MultiList with multiMultiList all would have the same options.

Order Result

The result of ordering the selected list is saved in the native switch to the attribute data-order

Example Native Select Result:

<select style="width:250px;" multiple="" id="asigned_terms3" tabindex="-1" class="select2-hidden-accessible" aria-hidden="true">
      <option value="24" data-order="1" data-multilist-id="15">Prueba creacion de termino 1</option>
      <option value="25" data-order="2" data-multilist-id="16">Prueba creacion de termino 2</option>
      <option value="26" data-order="3" data-multilist-id="17">Prueba creacion de termino 3</option>
      <option value="27" data-order="4" data-multilist-id="18">Destacado1_es</option>
      <option value="28" data-order="5" data-multilist-id="19">Destacado2_es</option>
      <option value="29" data-order="6" data-multilist-id="20">Destacado3_es</option>
  </select>

multilist's People

Contributors

kewelinho 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.