• Hey all,

    I’ve been trying to get this plugin to work on my latest project where the Divi theme was preferred. This theme has its own scroll to div id built in, but as far as I know no way to change or alter the animation/speed/offset etc. The theme seems to overwrite or conflict this plugin in such a way it doesnt change anything to the automatic scrolling set by the theme. I’ve found traces of this code in smoothscroll.js and custom.js, but disabling or commenting these parts doesnt seem to help (or maybe I am doing something wrong). The link to the testing page is: https://goo.gl/LCyHgQ . I’m hoping someone with similair experiences or someone with actual knowledge could help me, thnx in advance.

    PS: I found this extremely neat website visualising the different scroll animations: http://easings.net/ could be a good addition to the explanation of the plugin.

Viewing 1 replies (of 1 total)
  • Plugin Author malihu

    (@malihu)

    Hello,

    Thanks for the suggestion and the link to visualize the easing. I already have such link on the contextual help menu in plugin settings but I’ll try to find a way to add it next to the option field as well.

    I checked your link and you are correct as to what happens.
    The script you need to edit is:
    ..themes/Divi/js/custom.js
    See lines 746 to 770. This is the function that does the scrolling. If you comment-out everything from line 746 to 770, page scrolling should work via “Page scroll to id”.

    If you don’t want to comment/delete the whole function, you can try changing its selector, so it does not interfere with “Page scroll to id” links. To do this, go to line 746 and change the selector from:
    'a[href*="#"]:not([href="#"])'
    to:
    'a[href*="#"]:not(._mPS2id-h):not([href="#"])'

    This should do the trick.

    After doing this, you should probably also lower your offset value because 900 pixels is a bit big (the page will scroll near the top on the first link).

    FYI:
    On the next plugin version (which I’ll publish next week) I’ll have a new option in plugin settings that will enable the automatic removal of other click events affecting the links (i.e. what happens in your case).

Viewing 1 replies (of 1 total)
  • The topic ‘Compatibility with Divi themes’ is closed to new replies.