This provides a set of ponyfills to achieve the same behavior of offsetParent
, offsetLeft
and `offsetTopbefore the
offsetParent` spec was changed.
HTML <script src="https://unpkg.com/comrade-webflow-menu/dist/comrade-webflow-menu.js"></script>
--- #### JS ```JS new Menu({ breakpoint: 991, offsetTop: 0, topBar: true, mobileFooterOffsetTop: 0, locations: [ {
Angular2 or heigher directive that will calculate the height to for a given element so that it will fill the whole window according to its offsetTop and make it scrollable.
for when you have plenty of iframe, video & img html elements and want style-delay, window.scrollTop element.offsetTop and unmounting upon error
监听window的滚动事件,当被监听的DOM出现在屏幕的相应位置时,触发回调函数,回调函数的参数由{
offsetTop, offsetTopHeight, index}
offsetTop是此DOM元素距离文档顶部的距离
offsetTopHeight是此DOM元素距离文档顶部的距离加上偏移量
index是当前被监听DOM元素的索引