单击链接时停止表行切换

2024-04-05

我想做的是当有人单击表行中的 url 链接时停止切换。

$(document).ready(function () {
    $("#report tr:odd").addClass("odd");
    $("#report tr:not(.odd)").hide();
    $("#report tr:first-child").show();

    $("#report tr.odd").click(function () {
        $(this).next("tr").toggle();
        $(this).find(".arrow").toggleClass("up");
    });
    //$("#report").jExpand();
});

url 链接位于同一切换行上,当有人单击 url 链接时,它也会切换我试图停止的行。有关如何执行此操作的任何指示?


我认为下面可能对你有用。虽然没有测试过。

在链接中添加 Javascript 函数调用

$("#ANCHIOR_ID").click(function(event){
    event.stopPropagation();
    // then do your job there that you want to do in on click
  });
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

单击链接时停止表行切换 的相关文章

随机推荐