冒泡获取元素位置

$(document).delegate(".problem_detail_wrap", "mouseover", function (e) {

var left = e.target.getBoundingClientRect().left;

var top = e.target.getBoundingClientRect().top + 20;

$($(this).children()[1]).css({ 'top': top, 'left': left })

});

猜你喜欢

转载自blog.csdn.net/yezitoo/article/details/84629332