Sticky element top of page

I can’t figure out how to make a row sticky on a specific page…

The page is: https://bodyecologyu.com/courses/10-day-gut-smart-challenge/

And I want to make the timer at the very top stick while page is scrolled.

Any help appreciated!

Hi There,

Please follow steps:

  • Add the x-section-fixed to your section:

  • After that add this custom JS:
jQuery(function($) {
	$(window).scroll(function(){
        if($(window).scrollTop() > 0 ){
        	$('.x-section-fixed').addClass('x-fixed');
        } else {
        	$('.x-section-fixed').removeClass('x-fixed');
        }
    });
});
  • Then add this custom CSS:
.x-section.x-section-fixed.x-fixed {
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 99999;
    background: #fff;
}

Hope that helps and thank you for understanding.

Hi there…thanks for the help.

For some reason I am unable to locate the Setup Section that has the options for Class, etc.

I have “Advanced Settings” selected.

This is all I have in the Setup area…

Hi Charissa,

Please click on the CUSTOMIZE option and you should be able to see the setup options.

Hope this helps.

Wow…I feel like an idiot. THANKS!

You’re welcome :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.