Fork me on GitHub

Modern browsers only. The BsMultiSelect doesn't require jQuery. Still if you use jQuery you would like that BsMultiSelect continue to publish its events ('change' and 'dashboardcode.multiselect:change') through jQuery, using jQuery `trigger`, see in comments how to setup it.

<script type="module">
    import {createPopper} from "https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/esm/popper.min.js"
    import {ModuleFactory as dashboardCodeFactory} from "https://cdn.jsdelivr.net/npm/@dashboardcode/[email protected]/dist/js/BsMultiSelect.esm.min.js"

    var environment = {window, createPopper};
    // add this if you want to trigger events through JQuery events 
    // environment.trigger = (element,eventName) => $(element).trigger(eventName); 
    let dashboardCode = dashboardCodeFactory(environment);
    var bsMultiSelect = dashboardCode.BsMultiSelect(('#languages-id',  {placeholder: "placeholder"}); 
    // dashboardCode.BsMultiSelect.Default - access to default BsMultiSelect settings

 </script>