1.0.0 • Published 7 years ago

jquery-multiselect v1.0.0

Weekly downloads
54
License
ISC
Repository
github
Last release
7 years ago

jquery-MultiSelect

jquery-MultiSelect is a simple jquery Multiselect component which can be integrated very easily and provide as much as option required. Any missing feature info will be appreciated.

Demo

Live Demo URL : Not hosted Yet

Getting Started

You have to add "jquery-MultiSelect.js" and "jquery-MultiSelect.css" into your project. You can either download it directly or get using npm.

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

Import Using NPM:

npm install jquery-dropdown --save

Usage

After adding jquery-MultiSelect into your project, just add below code into your project.

<div id="multiselect"></div>
$("#multiselect").multiselect({
	data : [
		{
            id : 0,
            name : "Alaska"
        },
        {
            id : 1,
            name : "florida"
        },
        {
            id : 2,
            name : "New York"
        },
        {
            id : 3,
            name : "Ohio"
        }
	],
    onOptionSelect : function(item){
        console.log(item);
    }
});

Options List

OPtionRequired/OptionalDescription
dataRequiredData that needs to be render
placeholderOptionalCustom Placeholder for dropdown
searchPlaceholderOptionalCustom search Placeholder
classNameOptionalCustom classname to container
searchOptionalEnable Search control, disabled by default
disableOptionalDisable dropdown

data Object options

OPtionRequired/OptionalDescription
idRequired & UniqueUnique id for each list item
nameRequireddisplayName of list item

Events

OPtionRequired/OptionalDescription
onOptionSelectRequiredWill be triggered on selecting option from Multiselect list

Authors

*Sahil Gupta Github

License

This project is licensed under the Custom License - see the LICENSE.md file for details.