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

get select2 selected value jquery

$('#id :selected').text();
Comment

select2 find option by value

$('#Select2ID option[value="actualVal"]).text()
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

PREVIOUS NEXT
Code Example
Javascript :: how to reset checkbox jquery 
Javascript :: jquery click or touch 
Javascript :: javascript check format uuid 
Javascript :: javascript int max 
Javascript :: jquery remove element by id 
Javascript :: regex only uppercase letters js 
Javascript :: modal resetting when hide 
Javascript :: js explode equivalent 
Javascript :: url validator javascript 
Javascript :: console.log big red text 
Javascript :: disable scroll jquery 
Javascript :: js new line regex 
Javascript :: google apps script lock service 
Javascript :: javascript array split chunk 
Javascript :: node wait 10 seconds 
Javascript :: javascript isset 
Javascript :: select2 on change 
Javascript :: react native build android apk 
Javascript :: nangular make window available 
Javascript :: javascript scroll to end of div 
Javascript :: mongoose model find all documents with ids in array 
Javascript :: find sibling in jquery 
Javascript :: javascript is number an integer 
Javascript :: countup on scroll react only once 
Javascript :: string to url javascript 
Javascript :: find intersection of multiple arrays in javascript 
Javascript :: lerp javascript 
Javascript :: get params in nuxtjs 
Javascript :: how to change my npm version 
Javascript :: pass number as a prop in react 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =