jq获取元素到底部的距离

时间:2023-03-08 16:36:58
jq获取元素到底部的距离
// var wh = $(window).height(),//是文档窗口高度
// ot = $("#icoimg").offset().top,//是标签距离顶部高度
// ds = $(document.documentElement).scrollTop();//是滚动条高度// ds = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; 
// icoimg_h = $("#icoimg").height();//是标签高度 // // bh+$("div").height()+[$("div").offset().top-$(document).scrollTop()]=$(window).height(); // bh = wh - icoimg_h - [ot -ds ]; // console.log(bh);