All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ui.static.selectPicker.js Maven / Gradle / Ivy

There is a newer version: 0.8.0
Show newest version
function initSelectPicker(select) {
    let picker = select.selectpicker();
    picker.on('loaded.bs.select', function () {
        let $el = $(this);
        let $lis = $el.data('selectpicker').selectpicker.main.elements.filter(function (item) {
            return $(item).find(".value-marker").length > 0;
        });
        $($lis).each(function () {
            let li = $(this);
            let liValue = li.find(".value-marker").attr("data-value");
            if (!liValue) return;
            let tooltip_title = $el.find(`option[value=${liValue}]`).attr("data-title");
            if (!tooltip_title) return;
            li.tooltip({
                'boundary': "window",
                'title': tooltip_title,
                'html': true,
            });
        });
    });
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy