jquery - How can I get the id from a select2 dropdown -
i want associated id selected value in select2 dropdown. possible?
$myselect2.on("change",function(){ var textvalue = $(this).val(); //works console.log($(this).select2('id'));// ???? });
var theid = $(this).select2('data').id;
Comments
Post a Comment