Hi,
I am facing the same issue. It is kind of stuck in the content menu. Following.
-
This reply was modified 3 years, 6 months ago by storiesnmore.
Perhaps there is a fatal javascript eroor that is breaking scripts on your sites. I suggest opening the page in either Chrome or Edge (the new version), hit F12, and click the Console tab. If there are any errors, they could be breaking the ezTOC script which does smooth scrolling.
I hope this helps!
Thread Starter
sally
(@sallyruchman)
Checked, no error in Console
Best regards
Sally
Thread Starter
sally
(@sallyruchman)
Thanks to Marius from Elegantthemes Support I got it now working for my Divi Theme. If someone else has this issue, please see here the solution:
Add under Divi – Theme Options – Integration – Header the following Code Snippet, and adapt Header Height Values for Desktop / Mobile Version
`<script>
jQuery(function($) {
window.et_pb_smooth_scroll = function( $target, $top_section, speed, easing ) {
var $window_width = $( window ).width();
$menu_offset = -1;
var headerHeight = 30;
if ($window_width >= 980) {
headerHeight = 110;
}
if ( $ (‘#wpadminbar’).length) {
$menu_offset += $( ‘#wpadminbar’ ).outerHeight() + headerHeight – 45 ;
} else {
$menu_offset += headerHeight + 5;
}
//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>
Best regards
Sally