When it leaves viewport, add class “show” to #cart-bar
When it enters viewport, remove class “show” from #cart-bar
What happens is that when scrolling dow so that the DIV, which is initially fully within the viewport, is out of the viewport, #car-bar does not receive the class “show”. If you scroll back so that the div is in the viewport then scroll down so it’s out of the viewport AGAIN, it now works (#cart-bar gets the class “show”.