获得不同z-index但相同位置的div

时间:2014-08-20 20:37:29

标签: javascript jquery html

我有一个通过javascript定位的Div。

$("#'+customer.Id+'").css({
        left: customerOffset,
        width: customerWidth- endDayOffset,
        height: document.getElementById("Planning").rows[0].clientHeight,
        display: "normal",
        position: "absolute"
    });
    $("#'+customer.Id+'").offset({ top: bottomTop })

此div放置在具有特定Id的表格单元格上。 这是我想要获得的。 这怎么可能?

1 个答案:

答案 0 :(得分:0)

使用jquery .parents()方法查找祖先表格单元格。

$("#'+customer.Id+'").parents("td#' + tableCell.Id + '");

原来你问的是类似的坐标。

This Post也许可以帮到你。

相关问题