I was experiencing problems when resizing the window of my browser. The sticky element would always have the same width after resizing.
In order to fix this issue, I added some changes to the resizer function as once it assigned a fixed width to the stickyElement, every attempt to grab the element's width size would remain the same from the loops.
I had to also assign null to s.currentTop and call the scroller(); to bring the stickyElement back in view after resizing the widow. I hope someone can provide a more efficient solution though as I feel calling the scroller function over again is a bit heavy.
Hope this helps someone.
Issue Note: If you resize the window fast you can notice that the sticky element will be off position by a few pixels. Will post an update if I can find an issue to this problem.
I was experiencing problems when resizing the window of my browser. The sticky element would always have the same width after resizing.
In order to fix this issue, I added some changes to the resizer function as once it assigned a fixed width to the stickyElement, every attempt to grab the element's width size would remain the same from the loops.
I had to also assign null to s.currentTop and call the scroller(); to bring the stickyElement back in view after resizing the widow. I hope someone can provide a more efficient solution though as I feel calling the scroller function over again is a bit heavy.
Hope this helps someone.
Issue Note: If you resize the window fast you can notice that the sticky element will be off position by a few pixels. Will post an update if I can find an issue to this problem.