Skip to content

AlexandrMihailovich/ajax-multi-select

Repository files navigation

ajax-multi-select

Examples

demo

<link rel="stylesheet" href="style.css">

<select multiple="" id="select-1"></select>

<script src="jquery-3.2.1.js"></script>

<script src="multi-select.js"></script>
$('select').selectWidget({
        'maxSelect' 	: 8,
        'autoOpen'  	: false,
        'autoClear' 	: false,
        'hideSelected' 	: false,
        'minLength' 	: 3,
        'url'           : 'https://autocomplete.geocoder.api.here.com/6.2/suggest.json',
        'dataQuery'  : 'query',
        'requestData'   : {
            'app_id'    : 'KANwiewaDDXazappMZfV',
            'app_code'  : 'aUHzNr7xisoJCaSx0nb36w',
        },
        'respondVars'   : {
            value     : 'locationId',
            title     : 'label',
            container : 'suggestions'
        }
    });

Available options

{
  'maxSelect'     : 999,
  'url'			: 'http://localhost/',
  'autoOpen'		: true,
  'autoClear'		: true,
  'hideSelected'	: false,
  'minLength'		: 3,
  'requestType'   : 'GET',
  'classPrefix'   : '',
  'dataType'      : 'json',
  'requestData'   : {
        action: 	'action'
  },
  'dataQuery'     : 'q',
  'respondVars'   : {
        value     : 'value',
        title     : 'title',
        container : false
   }
}

Available methods

addSelected({
        value: 'option_value',
        title: 'option_title'
});

remove()

About

Ajax multiselect jQuery plugin

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published