引导程序中的jQuerycomboboxonchange事件无法正常工作

我正在使用这个插件来实现combobox 。 另外我需要获取选择列表的值,所以我添加了以下代码:

 $(document).ready(function(){ $('.combobox').combobox({ select: function (event, ui) { alert("the select event has fired!"); } }); }); 

stackoverflow解决方案 。 但在我的情况下,没有显示警报! 如何获得所选的选项值?

的jsfiddle

检查插件主页 ,我没有找到任何名为select的选项。

您可以将更改事件添加到创建的文本字段中,然后选择该值。

  $("input[type='text'].combobox").on("change", function () { alert($(this).val()); }); 

演示小提琴