Dhruti Dhruti - 7 months ago 68
Javascript Question

How to display selected text of multiselect dropdown in label using jquery?

I am using

Bootstrap Multiselect dropdown
. I want to display selected text in label. If I unselect the element should remove from label.

When I select this element should display in label,


Code tried so far:

enableFiltering: true,
includeSelectAllOption: true });

**the solution what I found to work in my case**

    selectAllValue: 'multiselect-all',
    enableCaseInsensitiveFiltering: true,
    enableFiltering: true,
    maxHeight: '300',
    buttonWidth: '235',
    onChange: function(element, checked) {
        var brands = $('#multiselect1 option:selected');
        var selected = [];
        $(brands).each(function(index, brand){