Type in either search box to narrow that list - try Platform - tick the people to move, then use the arrows.

jQuery PickList: Filtering and Checkboxes

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.

jqxPickList API used in this demo

Source code

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

script.js

$(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();
});

body.html

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

More jQuery PickList demos