Im using ScrollToFixed very successfully, with one catch. I have an expanding div inside my content, if the div is expanded, the scrollToFixed endpoint doesnt dynmaically increase to account for the new height.
So what happens is the endpoint remains fixed to the point originally calculated when the expanding div was closed. The div then fixes itself somewere in the middle and not to the point it should fix to after the div is expanded.
The easiest fix I can think of is to force scrollToFixed to recalculate the endpoint after the div is expanded, is there a way to do this?
Or any other solutions are also of course welcome!
@user338128 is on the right track; however, the plugin only calculates or recalculates its “endpoint” on initialization or window resize. When the div expands or contracts, call this:
This will cause the plugin to unfix its target then recalculate.