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

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM