multi-select icon indicating copy to clipboard operation
multi-select copied to clipboard

Easy way to get text of selected

Open SimonMoon opened this issue 12 years ago • 2 comments

(#my_select).text() pulls ALL source text,

need a simple way to get the text of the options

SimonMoon avatar Oct 29 '13 23:10 SimonMoon

What options? Selected? Unselected? If you just want options labels, just loop with $.each.

chrisvoo avatar Feb 23 '15 10:02 chrisvoo

$("#IdconceptosSeleccionados").multiSelect({ afterSelect: function (values) { var idconceptotext = ''; $('#IdconceptosSeleccionados :selected').each(function () { if ($(this).val() === values) { idconceptotext = $(this).text();
} });

        }

    });

fchinch avatar Aug 30 '18 15:08 fchinch