I have added the code suggested in this post, although my issue is that the module continues to slide down the page hiding the rows below it. Is it possible to force it to spot at the bottom of it’s column?
Thanks
Link to post:
- First, you’re going to need to open the settings for the module you want to be “sticky/fixed”.
- In the Advanced tab, scroll down to the ID option and add
stickysidebar
and save the settings. - Now close the Page Builder and open up the Customizer and navigate to Code > JavaScript code.
- In there add the following JS:
jQuery(function() {
var offset = jQuery("#stickysidebar").offset();
var topPadding = 15;
jQuery(window).scroll(function() {
if (jQuery(window).scrollTop() > offset.top) {
jQuery("#stickysidebar").stop().animate({
marginTop: jQuery(window).scrollTop() - offset.top + topPadding
});
} else {
jQuery("#stickysidebar").stop().animate({
marginTop: 0
});
};
});
});