code: 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;
  }
docs: Determine if the sticky element is currently sticking in the browser
  
  @param {Element} stickyElement
  @returns {boolean}