[ad_1]
Plugin Author
malihu
(@malihu)
Hello,
I think the js comes from Elementor smooth scrolling feature. Can you add some javascript in your theme/child-theme template? If yes, try this:
Add the following code in your theme/child-theme footer.php template, right above the closing body tag (</body>):
<script>
(function($){
$(window).on("elementor/frontend/init",function(){
if(typeof elementorFrontend==='undefined') return;
elementorFrontend.on("components:init",function(){
elementorFrontend.utils.anchors.setSettings("selectors.targets",".dummy-selector");
});
});
})(jQuery);
</script>Save, test and let me know if it worked.
- This reply was modified 2 hours, 9 minutes ago by malihu.
Thank you very much. It works now as expected!!!! 🙂
Furthermore, how would you go about embedding this in my child-theme so it doesn’t get overriden on any update?
Plugin Author
malihu
(@malihu)
You’re welcome 🙂
The quickest way is to copy the footer.php template from your theme to your child-theme and apply the script there (in the cloned footer.php in your child-theme dir).
Otherwise you could use the wp_add_inline_script in your child-theme functions.php to add the script via wp_enqueue_scripts.
I’m marking this as resolved but let me know if you need more help.
