Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #872033

    avishayil
    Participant

    Hi,
    I tried to change the element I want to scroll to form the Revolution Slider anchor as the latest code suggested here:
    https://community.theme.co/forums/topic/getting-the-anchor-link-in-revolution-slider-to-scroll-further-down-the-page/

    It works, but it first goes to the initial place (where it goes without the script), then jumps to the right place.

    Any ideas?

    Website:
    http://pixoneye.staging.wpengine.com/

    #872636

    Paul R
    Moderator

    Hi,

    You can try this code instead.

    
    jQuery(document).ready(function(t){
        t( ".x-slider-container.below .x-slider-scroll-bottom" ).off( "click");
        t('.x-slider-container.below .x-slider-scroll-bottom').click(function(e){
            e.preventDefault();
            var o=t(this).attr('href');
            t('html, body').animate({
                scrollTop:t('.x-main').offset().top-90},850,'easeInOutExpo')
            });
    });
    

    Hope that helps.

    #872756

    avishayil
    Participant

    It works, but on mobile the behavior is still the same.
    Any ideas?

    #873541

    Rue Nel
    Moderator

    Hello There,

    Before we continue checking the issue, Cornerstone 1.2.3 is now available! This release contains several bug fixes and we’re quite excited about the new features, so be sure to check out the changelog. Please do update to the latest version. After doing the updates, always remember to clear all caches when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

    Please let us know how it goes.

    #874944

    avishayil
    Participant

    Updated, problem still persists.
    No need to clear cache because it’s a staging site (no cache).

    #875587

    Rad
    Moderator

    Hi there,

    Maybe it needs late binding, please try this.

    jQuery(document).ready(function(t){
    
    setTimout ( function() {
    
        t( ".x-slider-container.below .x-slider-scroll-bottom" ).off( "click touchstart touchend");
        t('.x-slider-container.below .x-slider-scroll-bottom').click(function(e){
            e.preventDefault();
            var o=t(this).attr('href');
            t('html, body').stop().animate({
                scrollTop:t('.x-main').offset().top-90},850,'easeInOutExpo')
            });
    
    }, 500 );
    });

    Hope this helps.