Slider Above Masthead - Show Only Once

Is there a way to for the slider above the masthead to show only a single time? That is, when a user scrolls/clicks past the slider, returning to the top of the page stops with the header at the top, and links that send the user to the home page show the user the header menu rather than the slider after they’ve viewed it?

Any help would be greatly appreciated! Site & Login below.

Best,
Andrew

Hi there,

Thanks for writing around! This can be done with custom scripting, try adding the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript

function hide_slider() {
    var window_top = jQuery(window).scrollTop();
    var div_top = jQuery('header.masthead').offset().top;
    if (window_top > div_top) {
        jQuery('.x-slider-container.above').hide();
    }
}
(function($) {
    $(window).scroll(hide_slider);
    hide_slider();
})(jQuery);

As you see this requires custom development, we won’t be able to support any issue caused by the above script or if anything breaks due to the script provided.

Thanks!

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