Select2 drop down change event not working

Arun Raj R picture Arun Raj R · Jun 24, 2017 · Viewed 18.2k times · Source

I am using Select2 drop down and I need to do some functionalities based on the the drop down selection.

I have tried the following code, but it didn't worked for me.

$eventSelect.on("select2:select", function (e) { log("select2:select", e); });

$eventSelect.on("change", function (e) { log("change"); });

Can anyone tell me how can I make this work?

Answer

Arun Raj R picture Arun Raj R · Jun 27, 2017

I am using select2 version 3.3.2 and the following code is working for me

$("#id").on("change", function () { debugger; });