• Resolved anjanphukan

    (@anjanphukan)


    Hi,

    When installed with elementor plugin, the scrolling effects doesn’t work well. Please check the issue in this video.

    The “About” and “Blog” has the ID from elementor page builder. The “Contact” has the ID coded in HTML.

    It works well with “Contact” but not with others.

    Can it be fixed?

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author malihu

    (@malihu)

    Hello,

    Check if enabling “Prevent other scripts from handling plugin’s links” option in plugin settings solves the issue.

    Also check if there’s an option in Elementor to disable page scrolling.

    Let me know

    Thread Starter anjanphukan

    (@anjanphukan)

    Hi @malihu,

    I just tried that but it didn’t work for me. Sorry.

    Plugin Author malihu

    (@malihu)

    If enabling the option has no effect and there’s no setting in Elementor to disable it, you’ll have to do it manually.

    Normally, the following script should exist in Elementor plugin directory:

    ...plugins/elementor/assets/js/frontend.min.js

    If I’m not mistaken, this script handles smooth scrolling for the Elementor plugin.

    You need to edit edit frontend.min.js, find the text:

    a[href*="#"]

    and change it to:

    a[href*="#"]:not(._mPS2id-h)

    Save the file and test your page.

    Thread Starter anjanphukan

    (@anjanphukan)

    Hi @malihu

    Yeah, it works this way. Thank you so much. But with that I have to edit the core file of the elementor plugin, I believe which is not advisable.

    Do you think, the scrolling plugin can have a permanent solution for this in future, because elementor is becoming popular these days?

    Plugin Author malihu

    (@malihu)

    Yes it’s not advisable as you’d have to redo the changes after upgrading the Elementor plugin, but there’s no other way. In general, the problem is that smooth scrolling functionality that is added in plugins like Elementor is usually very simple without any options to disable it.

    The “permanent” solution is already implemented within “Page scroll to id” and it’s the “Prevent other scripts from handling plugin’s links” option in its settings.

    This option works well most of the times but not always, as it depends on how the other plugins/themes implement their smooth scrolling functionality. Elementor plugin implements this functionality in such way that “Page scroll to id” cannot remove it automatically.
    “Page scroll to id” cannot alter the code of other scripts directly, so in this case, only the user can (ie you).

    If I find another way to do this I’ll implement it within the plugin (as a new option or by updating the current one).

    Thread Starter anjanphukan

    (@anjanphukan)

    Thank you so much for explaining this. I appreciate it. All the best.

    Plugin Author malihu

    (@malihu)

    Hey, no problem ??

    I’ve just made some tests and if you can add some extra javascript in your theme/child theme, you could probably make it work without editing frontend.min.js directly.

    If you have time, try the following:

    1. Undo the changes in frontend.min.js.

    2. Disable (uncheck) “Prevent other scripts from handling plugin’s links” option in “Page scroll to id” settings.

    3. Edit your theme/child theme footer.php and add the following script in a new line below wp_footer() function (e.g. just before the closing body tag):

    <script>
    (function($){
        $(window).on("load",function(){
            setTimeout(function(){
                var doc=$(document),
                    $events=$("a[href*='#']").length ? $._data(doc[0],"events") : null;
                if($events){
                    for(var i=$events.click.length-1; i>=0; i--){
                        var handler=$events.click[i];
                        if(handler && handler.namespace != "mPS2id" && handler.selector === 'a[href*="#"]' ) handler.selector='a[href*="#"]:not(._mPS2id-h)';
                    }
                }
            },300);
        });
    })(jQuery);
    </script>

    Save footer.php and test your page.

    If the above doesn’t work you can try changing the script to:

    <script>
    (function($){
        $(window).on("load",function(){
            setTimeout(function(){
                var doc=$(document),
                    $events=$("a[href*='#']").length ? $._data(doc[0],"events") : null;
                if($events){
                    for(var i=$events.click.length-1; i>=0; i--){
                        var handler=$events.click[i];
                        if(handler && handler.namespace != "mPS2id" && handler.selector === 'a[href*="#"]' ) doc.off("click",handler.handler);
                    }
                }
            },300);
        });
    })(jQuery);
    </script>

    Hope this helps
    I appreciate any feedback ??

    Thread Starter anjanphukan

    (@anjanphukan)

    Hi @malihu,

    You are a superstar. The first option worked for me. Thank you so so much. You saved me. ??

    Regards
    Anjan

    Plugin Author malihu

    (@malihu)

    Thanks for letting me know ??

    Help me please!
    The problem is that two menu items are highlighted at once. It is necessary to highlight only one of them while scrolling through the page
    how to fix: https://prntscr.com/kmi40s
    site: https://makaroni.design-time.com.ua/
    I use: Elementor Pro, oceanwp, Page scroll to id

    Plugin Author malihu

    (@malihu)

    @palyhatata Not sure if you solved the issue(?) Please check the following FAQ:
    https://manos.malihu.gr/page-scroll-to-id-for-wordpress/2/#faq-12

    Is there still no option to turn off the elementor-enabled smooth scroll?

    I don’t have elementor on all my pages and prefer to code my own smooth scrolling, so I would love to permanently turn off Elementor smooth scrolling.

    Plugin Author malihu

    (@malihu)

    @david44pixel Check this guide:

    https://manos.malihu.gr/page-scroll-to-id-elementor-guide/

    You need to go to plugin settings and enable “Prevent other scripts from handling plugin’s links” option.

    This seems to be plugin specific advice for “page scroll to id” plugin. I am not using this plugin.

    I just want a settings option inside Elementor to disable Elementors smooth scroll to id.

    Plugin Author malihu

    (@malihu)

    @david44pixel You’re posting in “Page scroll to id” support threads, that’s why I provided a plugin level solution.

    If you want support for Elementor, you should post in Elementor support forum:
    https://www.ads-software.com/support/plugin/elementor/

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Scroll effects conflicts with Elementor scrolling’ is closed to new replies.