sticky-events.js
function isSticking(stickyElement) {
  const topSentinel = stickyElement.previousElementSibling;

  const stickyOffset = stickyElement.getBoundingClientRect().top;
  const topSentinelOffset = topSentinel.getBoundingClientRect().top;
  const difference = Math.round(Math.abs(stickyOffset - topSentinelOffset));

  const topSentinelTopPosition = Math.abs(parseInt(window.getComputedStyle(topSentinel).getPropertyValue('top')));

  return difference !== topSentinelTopPosition;
}
function isSticking(stickyElement) {
  const topSentinel = stickyElement.previousElementSibling;

  const stickyOffset = stickyElement.getBoundingClientRect().top;
  const topSentinelOffset = topSentinel.getBoundingClientRect().top;
  const difference = Math.round(Math.abs(stickyOffset - topSentinelOffset));

  const topSentinelTopPosition = Math.abs(parseInt(window.getComputedStyle(topSentinel).getPropertyValue('top')));

  return difference !== topSentinelTopPosition;
}
function isSticking ( stickyElement ) { const topSentinel = stickyElement . previousElementSibling ; const stickyOffset = stickyElement . getBoundingClientRect ( ) . top ; const topSentinelOffset = topSentinel . getBoundingClientRect ( ) . top ; const difference = Math . round ( Math . abs ( stickyOffset - topSentinelOffset ) ) ; const topSentinelTopPosition = Math . abs ( parseInt ( window . getComputedStyle ( topSentinel ) . getPropertyValue ( 'top' ) ) ) ; return difference !== topSentinelTopPosition ; }
Determine if the sticky element is currently sticking in the browser

@param {Element} stickyElement
@returns {boolean}
Determine if the sticky element is currently sticking in the browser