Skip to content Skip to footer

Elementor Scroll-margin-top issue

I recently had to use Scroll-margin-top which didn’t work as expected so I found many solutions but only solution that worked is

<script>
window.addEventListener('elementor/frontend/init', function() {
  elementorFrontend.hooks.addFilter( 'frontend/handlers/menu_anchor/scroll_top_distance', function(scrollTop) {
    return scrollTop - 110;
  })
})
</script> I found this on github.

Leave a comment