Giter Site home page Giter Site logo

jquery.comboselect's Introduction

JQuery.comboselect

This is a port and a rehabilitation of the JQuery.comboselect.

What's it do?

The plugin transforms a multi-select from a single element to side by side multi-selects. You can move selections from one select to another instead of highlighting them in single. Look at the example. This will make a lot more sense, I assure you.

As part of the transformation, your select is hidden, but updated as you double-click or select and press the add/remove buttons.

Usage

Shown with default options as options

$(#my_multi_select_box).comboselect({
    sort: 'both',  // sort which sides? 'none'|'left'|'right'|'both'  -> based on original select's order
    addremall : true,  // include the add/remove all buttons
	    add_allbtn: ' >> ',   // label for the "add all" button
    rem_allbtn: ' << ',    // label for the "remove all" button
	    addbtn: ' > ',   // label for the "add" button
    rembtn: ' < ',    // label for the "remove" button
    cs_container: 'div', //  html tag to contain both comboselects
    btn_container: 'div' // html tag to contain the comboselect buttons
});

To set for legeacy compatibility, define the following after you include the plugin, but before you 'wire' it to anything:

jQuery.fn.comboselect.defaults = {
    sort: 'both',
    addremall : false,
	    addbtn: ' > ',
    rembtn: ' < ',
    cs_container: 'fieldset',
    btn_container: 'fieldset'
};

This method can be used for any defaults you prefer, so you do not have to set options on each use of the comboselect.

Version History

2.0.0 Reworking release, no sorting

  • Removed selso dependency
  • Added ability to set global options
  • Added add/remove all button and text options
  • Changed fieldsets to divs for select and button containers
  • Added option to specify container element for generated selects
  • Added option to specify container element for generated buttons

1.0.2 Now works correctly if the form is not the immediate parent of the select.

  • Clears originally selected options before updating with user's new selections on submit.
  • Correctly transforms selects whose options were added dynamically.

1.0.1 Correctly transforms inputs which already had options selected.

1.0.0 Initial release.

jquery.comboselect's People

Stargazers

Kibet Yegon  avatar

Watchers

Kibet Yegon  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.