There is no UI option in Elementor to disable smooth scroll, however it can certainly be disabled using an option below (uses Elementor JS Hooks).
Option 1 using Code Snippets plugin - arguably the best way since it doesn't require Elementor Pro and because it ensures that Elementor is loaded before the script runs.
Copy this- you'll use it in Step 3
// add inline script to disable elementor smooth scroll
add_action( 'wp_enqueue_scripts', function() {
wp_add_inline_script( 'elementor-frontend', "jQuery(window).on('elementor/frontend/init',function(){if(typeof elementorFrontend==='undefined'){return}elementorFrontend.on('components:init',function(){elementorFrontend.utils.anchors.setSettings('selectors.targets','.dummy-selector')})});" );
} );
- Install and Activate Code Snippets plugin
- WP Admin > Code Snippets > Add New and insert a title such as
disable elementor smooth scroll
- Paste the code directly above into the editor.
- Set the snippet to run on the front-end only
- Save and activate the snippet
Option 2 using Elementor Pro
Copy this- you'll use it in Step 3.
<script defer>
jQuery( window ).on( 'elementor/frontend/init', function() {
if ( typeof elementorFrontend === 'undefined' ) {
return;
}
elementorFrontend.on( 'components:init', function() {
elementorFrontend.utils.anchors.setSettings( 'selectors.targets', '.dummy-selector' );
} );
} );
</script>
- WP Admin > Elementor > Custom Code
- Add New and insert a title such as
disable elementor smooth scroll
- Paste the code directly above into the editor.
- Set
Location to <body> - End (this is a drop-down above the code editor)
- Set
Priority to 10 (also a drop-down above code editor) - not necessary but I see no reason to make this load before other scripts
- Publish with default
Condition set to Entire Site or set to whatever conditions you need.
Option 3 using a custom JS plugin such as Simple Custom CSS and JS
Note: these are general directions - follow the plugin docs for exact implementation.
- Install and activate custom JS plugin of choice.
- Create a new script item.
- Add a script block using the JS code from option 2 of this answer - you may or may not need the script tags depending on your plugin.
- Save (and maybe activate) it. You may need to set the priority so it loads after Elementor.
Option 4 using child theme
If you understand the heading, then you're a theme developer, so I'll simply say that you can monkey it into your functions.php file, a template file, or add the JS code (within a <script> block) to its own .js file and include it however you like.
AS ALWAYS, CLEAR CACHE
After completing any procedure above and testing, if you use any local caching plugins, clear them. If you use Cloudflare or a CDN, purge it.
Credit
@jamesckemp's awesome solution to disable Elementor smooth scroll on github