sticky
sticky copied to clipboard
topSpacing based on element
topSpacing: $( '.my-element' ),
This would be very useful. Would need to update on re-size of course ;) Thanks for considering!
You can get the height of an element with jquery, then use that variable in your sticky function.
var elementHeight = $('#sticky-element-1').outerHeight();
$("#sticky-element-2").sticky({ topSpacing: elementHeight });
Yes of course that can be done. But this is something that would be nice to have in the script itself.