I'm using the Bootstrap 4 class "sticky-top" (for position: sticky) to stick elements, you guessed it, at the top.
Is there any way to add an extra class like "is-sticky-top" to the DIV when it's "stuck"?
I found this but I couldn't adapt it to my needs: https://developers.google.com/web/updates/2017/09/sticky-headers
EDIT - To clarify what I need:
The class "sticky-top" adds position:sticky to an element. In my case, I want to add an extra class to a DIV if the position of the DIV is sticky on top. For example to add a shadow to the element but only if it's "stuck" on top. So I need class B only in this case