Open ghost opened 7 years ago
Hi! i am having the same issue, any update? Thanks!
Guide: You can change core sticky file to use bottomSpacing with function to check destination point pause sticky
Edit file sticky.js file: http://prntscr.com/hnrb6e Change old line
var newTop = documentHeight - s.stickyElement.outerHeight()
- s.topSpacing - s.bottomSpacing - scrollTop - extra;
To
// EDIT
var newTop = documentHeight - s.stickyElement.outerHeight()
- s.topSpacing - scrollTop - extra;
if (typeof s.bottomSpacing === 'function') {
newTop = newTop - s.bottomSpacing();
}else {
newTop = newTop - s.bottomSpacing;
}
// END EDIT
Use new config bottomSpacing with function check end point: http://prntscr.com/hnrcd3
$('#examp-sticky').sticky({
bottomSpacing: function(){
return $('html').height() - $('.fake-end-point').offset().top;
},
});
Hi! HOW TO: Stick element to parent container?
And how to stick element to col-md-12 class?