Javascript jquery行高亮显示异常
我遇到了一个问题,在jquery中突出显示onclick中的一行将不允许我访问该行中的链接 我的解决方案是突出显示所有Javascript jquery行高亮显示异常,javascript,jquery,Javascript,Jquery,我遇到了一个问题,在jquery中突出显示onclick中的一行将不允许我访问该行中的链接 我的解决方案是突出显示所有,除了带有链接的那一个。以下是我的想法: $(document).ready(function() { $("#List tr td").not(td[id*=NOTES]).click(function()) { $(this).closest("tr").siblings().removeClass("highlighted");
,除了带有链接的那一个。以下是我的想法:
$(document).ready(function() {
$("#List tr td").not(td[id*=NOTES]).click(function()) {
$(this).closest("tr").siblings().removeClass("highlighted");
$(this).toggleClass("highlighted");
};
});
以下是我最初使用的内容:
$(document).ready(function() {
$("#RegistrantList tr td").click(function()) {
$(this).closest("tr").siblings().removeClass("highlighted");
$(this).toggleClass("highlighted");
};
});
我走对了吗?或者有没有更简单的方法
相关的你能做一把小提琴吗?你目前正在从
tr
元素中删除该类,但添加到td
。。所以这是行不通的。。但是你真的应该试着解决实际问题,需要更多地描述…@gabykag.Petrioli yeh,再加上字符串td[id*=NOTES]
-我想我们需要一把小提琴才能解决这个问题。$(“#List tr td”)。not('td[id*=NOTES')
@DavidThomas他有。NOTES(td[id*=NOTES])
。。它必须至少是.not('td[id*=NOTES]')
。正如他所说,td[id*=NOTES]
不是字符串文字。