jQuery可与其他事件一起选择
我在这样的表上使用jQuery可选jQuery可与其他事件一起选择,jquery,jquery-ui-selectable,Jquery,Jquery Ui Selectable,我在这样的表上使用jQuery可选 var body=$("<tbody class='selectable'></tbody>") body.selectable({ filter: 'td:not(:first-child)' }); // this is the first column which is filteres out of the selectable $(".first-col").on('click',function(e){
var body=$("<tbody class='selectable'></tbody>")
body.selectable({
filter: 'td:not(:first-child)'
});
// this is the first column which is filteres out of the selectable
$(".first-col").on('click',function(e){
console.log("click for first column is here");
});
var body=$(“”)
body.可选({
筛选器:“td:not(:第一个子项)”
});
//这是从可选择列表中筛选出的第一列
$(“.first col”)。在('click',函数(e)上{
log(“单击此处为第一列”);
});
我希望第一列具有不同的回调函数,但从未调用对第一列的单击。有可能这样做吗?我做错了什么
谢谢你的帮助
V这实际上是一个已知的具有可选功能的“bug”。您可以将“距离”选项设置为0以外的任何值(默认值)来解决此问题,但最好的方法是将“单击”更改为“鼠标向下”(将有效)
例如
$(".first-col").on('mousedown',function(e){
console.log("click for first column is here");
});
为什么不能将单击事件附加到“.selective”?