Select2下拉更改事件不起作用 [英] Select2 drop down change event not working
本文介绍了Select2下拉更改事件不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 Select2 下拉菜单,我需要根据下拉选项执行一些功能。
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?
推荐答案
我正在使用select2版本 3.3.2 ,以下代码适用于我
I am using select2 version 3.3.2 and the following code is working for me
$("#id").on("change", function () { debugger; });
这篇关于Select2下拉更改事件不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文