Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

select2 get selected value

//get all selected select object
$('#select2Id').find(':selected');

//get all selected value 
$("#select2Id").select2("val");
Comment

multiple value selected in select2

var selectedValuesTest = ["WY", "AL", "NY"];
$(document).ready(function() {
  $("#e1").select2({
    multiple: true,
  });
  $('#e1').val(selectedValuesTest).trigger('change');
});
Comment

select2 multi select get selected value

alert("Selected value is: "+$(".leaderMultiSelctdropdown").select2("val"));

alternatively, if you used a regular selectbox as base, you should be able to
use the normal jquery call, too:

alert("Selected value is: "+$(".leaderMultiSelctdropdown").val());
Comment

select2 multiple selected values

in_array($value, $array)
Comment

PREVIOUS NEXT
Code Example
Javascript :: node.js function 
Javascript :: babel start command nodejs 
Javascript :: how to display image from s3 bucket in react js 
Javascript :: accessing via name jquery 
Javascript :: usecontext react 
Javascript :: anagram checker javascript 
Javascript :: accept 2 values after decimal in angular forms 
Javascript :: js use restrict 
Javascript :: expect any function jest 
Javascript :: js array map 
Javascript :: how to comments in json file 
Javascript :: javascript get page args 
Javascript :: nodejs watermark image 
Javascript :: javascript get client page title 
Javascript :: jsx babel webpack 
Javascript :: flutter or react native 
Javascript :: how to use javascript in flutter 
Javascript :: regex check if number is greater than 
Javascript :: javascript function return multiple 
Javascript :: js add item to array 
Javascript :: client.on ready 
Javascript :: async arrow function in javascript 
Javascript :: use navigate in class component react native 
Javascript :: jquery check is select 
Javascript :: Expected a JavaScript module script but the server responded with a MIME type of "text/html" 
Javascript :: how to get first element of an array in javascript 
Javascript :: create node js server 
Javascript :: react chrome extension 
Javascript :: Round date to future 5min 
Javascript :: how to create a pop up in middle screen javascript 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =