Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jQuery可与其他事件一起选择_Jquery_Jquery Ui Selectable - Fatal编程技术网

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){

我在这样的表上使用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){
      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”?