With the size check in place it means that the scroll event is never attached when the sticky element is the same size or larger than the content.
However, when the content size can increase dynamically then this means that the sticky element doesn't work correctly, as shown in the following gif.
I've removed the check so that the scroll event is always attached. This means that when the content size dynamically changes the sticky element works correctly.
With the size check in place it means that the scroll event is never attached when the sticky element is the same size or larger than the content.
However, when the content size can increase dynamically then this means that the sticky element doesn't work correctly, as shown in the following gif.
I've removed the check so that the scroll event is always attached. This means that when the content size dynamically changes the sticky element works correctly.
I've also updated the minified javascript.