Jak*_*itz 5 coldfusion jquery jquery-select2
我正在使用Select2来增强我的<select>输入.我填充了<options>coldfusion和sql.formatNoMatches如果用户搜索中没有匹配项,我想用来添加选项.我不希望使用多选,因为它不符合我的ColdFusion的工作,再加上它就会简单得多只需一个点击事件添加到formatNoMatches.
在select2.js的某处,有一些代码可以阻止鼠标事件的发生formatNoMatches.有没有办法破解它将允许鼠标事件?
$(".select").select2({
allowClear: true,
blurOnChange: true,
openOnEnter: false,
formatNoMatches: function(term) {
return "<a href='#' onclick='alert('" + term + "');'"
+ "id='newClient'>Add New Client</a>";
}
});
Run Code Online (Sandbox Code Playgroud)
我无法得到上面的代码来提醒任何事情.
这是 select2 的问题。同样存在一个错误。但到现在还没有解决办法。有一些想法,您可以在下面找到详细信息。
https://github.com/ivaynberg/select2/issues/276
| 归档时间: |
|
| 查看次数: |
6121 次 |
| 最近记录: |