0

我在这样的表上使用可选择的 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");
 });

我希望第一列具有不同的回调函数,但是永远不会调用第一列的单击。是否有可能做到这一点?我究竟做错了什么?

感谢您的任何帮助

4

1 回答 1

0

这实际上是一个可选的已知“错误”。您可以将距离选项设置为 0(默认)以外的任何值来解决此问题,但最好的方法是将单击更改为鼠标按下(将起作用)。

例子...

 $(".first-col").on('mousedown',function(e){
      console.log("click for first column is here");
 });
于 2013-05-29T01:39:17.843 回答