Type in either search box to narrow that list - try Platform - tick the people to move, then use the arrows.
Type in either search box to narrow that list - try Platform - tick the people to move, then use the arrows.
jqxPickList with a search box above each list and checkbox selection - the way to pick from a long list, where scrolling and Ctrl+click get in the way. Type to narrow a list, tick the people to invite, then move them.
A live JavaScript/jQuery example of jqxPickList, the jQWidgets PickList component, with its complete source code below. It is one of 7 jqxPickList demos for jQuery.
width property – Sets or gets the width of the widget.height property – Sets or gets the height of the widget.source property – Sets or gets the pool of available items.selectedItems property – Sets or gets the values that start in the Selected list.sourceHeader property – Sets or gets the header text of the available list.targetHeader property – Sets or gets the header text of the selected list.filterable property – Sets or gets whether a search box is displayed above each list.filterPlaceHolder property – Sets or gets the placeholder text of the search boxes.checkboxes property – Sets or gets whether items are selected with checkboxes.change event – This event is triggered when the selected items change.getSelectedItems method – Returns the items currently in the selected list, in order.To run it in your own page, load jqx.base.css, a theme and the library files below from npm (npm install jqwidgets-scripts) or the jsDelivr CDN, then add the markup and the script. jQuery is not required: jqxcore.js provides $.
The page loads jqx.base.css, a theme and these library files: jqxcore.js, jqxbuttons.js, jqxscrollbar.js, jqxcheckbox.js, jqxlistbox.js, jqxpicklist.js.
It also loads helper scripts of this demo site, which are not part of the library: demos.js (getWidth() and other layout helpers).
$(document).ready(function () {
// Inviting people to a meeting from a whole department. With checkboxes, a click
// ticks an item without dropping the others; with filtering, the list can be
// narrowed by name or by team before ticking.
var people = [
'Alice Chen (Design)', 'Amir Haddad (Platform)', 'Ana Souza (Sales)', 'Ben Okafor (Platform)',
'Carla Rossi (Marketing)', 'Chloe Martin (Design)', 'Daniel Kim (Finance)', 'Diego Alvarez (Sales)',
'Elena Petrova (Platform)', 'Emma Wilson (Support)', 'Farah Nasser (Marketing)', 'George Papas (Finance)',
'Hana Sato (Design)', 'Ivan Horvat (Support)', 'Julia Weber (Platform)', 'Karim Bello (Sales)',
'Lena Fischer (Marketing)', 'Marco Bianchi (Support)', 'Nadia Rahman (Finance)', 'Omar Farouk (Platform)',
'Priya Nair (Design)', 'Sam O\'Neill (Support)', 'Tomasz Nowak (Sales)', 'Yuki Tanaka (Finance)'
];
$('#jqxPickList').jqxPickList({
width: 640,
height: 380,
source: people,
selectedItems: ['Alice Chen (Design)', 'Julia Weber (Platform)'],
sourceHeader: 'Department',
targetHeader: 'Invited',
filterable: true,
filterPlaceHolder: 'Search by name or team...',
checkboxes: true
});
var showSelection = function () {
var invited = $('#jqxPickList').jqxPickList('getSelectedItems');
$('#count').text(invited.length === 1 ? '1 person invited' : invited.length + ' people invited');
$('#selection').text(invited.join(', '));
};
$('#jqxPickList').on('change', showSelection);
showSelection();
});
<div id="content">
<div class="demo">
<p class="demo-hint">
Type in either search box to narrow that list - try <em>Platform</em> - tick the people to move, then use the arrows.
</p>
<div id="jqxPickList"></div>
<div class="demo-result">
<strong id="count"></strong>
<span id="selection"></span>
</div>
</div>
</div>