Select2 Multiple Selected Get Value and Text Example

Admin   HTML5 - CSS   415  2021-03-12 20:50:03

+Hello Friend,

Today, I am going learn you how to get select2 multiple selected value or text using jquery. I will show you get multiple selected value or text in jquery. We will get multiple selected text in jquery.

Jquery select2 plugin is a very famous jquery plugin, using select2 plugin we can do several thing like select box with search, select option with check box, ajax auto-complete etc.

Here I will give you solution and full example for get select2 multiple selected value or text using jquery.

Solution 1 : Get Text

 

var selected = $('.category').find(':selected').text();

Solution 2 : Get Text

 

var selected = $('.category').select2("data");

for (var i = 0; i