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; 

http://jsfiddle.net/platypusman/xduug/


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -