1. PROMO Upgrade to Pro Membership @ $99 / Lifetime & access all our 16+ premium Divi extensions: Divi Block, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Solved offset anchor link

Discussion in 'Free Divi Community Forum' started by PATRICIA RANGEL LEMGRUBER, Nov 4, 2020.

  1. PATRICIA RANGEL LEMGRUBER

    Divi Ultimate Header Plugin

    Hi,

    I built my menu with the theme builder. I did not change the default position of the fullwidth menu module.
    My links do not scroll to the right place. This is my site:
    https://desenvolvimento.lemper.com.br/rdsol

    Can anyone point me in the right direction? thanks
     
    1. PRO MEMBER PERKS Divi.Help Layout AI Generator - Try the power of AI to generate a custom Divi layout for you:Try Now
  2. Jiri

    Jiri New Member

    could please someone find a solution? I have the same problem. Old fix doesn't work with menus built in Divi Builder anymore
     
  3. PATRICIA RANGEL LEMGRUBER

    Divi Ultimate Header Plugin

     
    1. PRO MEMBER PERKS Divi Block Pro - Premade gallery carousel design for your Divi site without using any plugins:View Demo
  4. PATRICIA RANGEL LEMGRUBER

    Divi Ultimate Header Plugin

    Hi! https://www.elegantthemes.com/ gave me this solution.
    Add this to the Divi theme options (integration)
    Hope it works!

    <script>
    jQuery(function($) {
    window.et_pb_smooth_scroll = function( $target, $top_section, speed, easing ) {
    var $window_width = $( window ).width();
    $menu_offset = -1;
    var headerHeight = 143;
    if ( $ ('#wpadminbar').length && $window_width <= 980 ) {
    $menu_offset += $( '#wpadminbar' ).outerHeight() + headerHeight;
    } else {
    $menu_offset += headerHeight;
    }
    //fix sidenav scroll to top
    if ( $top_section ) {
    $scroll_position = 0;
    } else {
    $scroll_position = $target.offset().top - $menu_offset;
    }
    // set swing (animate's scrollTop default) as default value
    if( typeof easing === 'undefined' ){
    easing = 'swing';
    }
    $( 'html, body' ).animate( { scrollTop : $scroll_position }, speed, easing );
    }
    });
    </script>
     
  5. Dick Ockers

    Dick Ockers New Member

    1. PRO MEMBER PERKS Divi Cart Count Plugin - Easily add cart count to your Divi cart icon. 6 different styles to choose from:Learn More
  6. Bill Horvath

    Bill Horvath New Member

    I tried tons of css tricks and js and all of them scrolled to the top of the anchor and then pushed the content behind the fixed header. This js actually worked! Thank you!
     
    paul thomas likes this.
  7. thjasp

    thjasp New Member

    I put it in the right section and I included the <script> tags.
     
    1. PRO MEMBER PERKS Divi Ultimate Archive Plugin - Tons of elegant premade sidebar styles to choose from for your Divi site:Learn More