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);

  

原文地址:https://www.cnblogs.com/xupeiyu/p/4825713.html