为了账号安全,请及时绑定邮箱和手机立即绑定

.offset().top的位移高度是相对于body还是.leftmenu_main li???

.offset().top的位移高度是相对于body还是.leftmenu_main li???

慕妹3146593 2018-11-14 14:14:04
$(".leftmenu_main li").hover(function () {    $(this).addClass('hover');    var menuTop = $(this).offset().top;        var itemsList = $(this).children(".sec_cd");    var itemsCount = itemsList.find('.sec_icon').length;    itemsList.css("top", subMenuTop).fadeIn("fast");}, function () {    $(".sec_cd").hide();    $(this).removeClass('hover');});
查看完整描述

1 回答

?
holdtom

TA贡献1805条经验 获得超10个赞

为什么不查 API

Get the current coordinates of the first element in the set of matched elements, relative to the document.


查看完整回答
反对 回复 2018-12-11
  • 1 回答
  • 0 关注
  • 614 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号