我正在尝试在我的jQuery代码中组合td:not(:first-child)和td:empty selectors.我在下面附上了一段代码摘录.此代码使用hoverIntent插件在1秒的时间延迟后执行功能代码.
$(".jqgrow td:not(:first-child)") .mouseenter(function(){ $.doTimeout('cellhover',1000,function(e){ my_tooltip .css({opacity:0.85,display:"none"}) .stop() // Added stop() to fix bug,flickering of tooltip .fadeIn(10); }); });
简单来说,如果鼠标不在我表中的第一列(此表包含其内容与我的工具提示无关的单元格),并且鼠标所在的单元格不为空,我需要触发该函数.我不确定是否使用td:empty或使用.html().
我尝试了以下没有奏效的方法:
$(".jqgrow td:not(:first-child) td:empty") $(".jqgrow td:empty td:not(:first-child)") $(".jqgrow td:not(:first-child,:empty)")
我看到使用.is(:empty)和filter()与其他问题相关的想法,但我不知道如何将其应用于这种情况.
我会感激任何帮助!