• Resolved gfdesign

    (@gfdesign)


    Dear support
    First off, kudos for this excellent plugin. I hope you can help me.
    The problem I have is that two last menu items are not highlighted when user clicks on them or scroll to these sections. I know is not a CSS related, because I can see the ‘mPS2id-highlight’ class does not appear in the HTML code using the inspector tool.
    Could you take a look to see what could be the problem?
    Thanks in advance.
    Regards

    The page I need help with: [log in to see the link]

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

    (@malihu)

    Hi,

    How did you add the arrow links in your page? Did you add them via HTML code?

    Thread Starter gfdesign

    (@gfdesign)

    Hi @malihu
    I am not sure what you asked. All of them were inserted with Elementor (the visual editor we use). I cloned the sections (that work) and replace the links and anchor texts. For your information, the anchor tag, does not receive the ‘mPS2id-target’ class when I click in any section that does not work but it appears in sections that do work.
    Let me know if you need something else from my side.
    I appreciate your help
    Best regards

    Plugin Author malihu

    (@malihu)

    Yes I saw that the mPS2id-target class is not added. I also saw that there’s a js error generated in dev tools console.

    I noticed that there is a class _mPS2id-t (which is a plugin class that’s added automatically) on 3 of your sections. This class should not be there (it’s added on the targets by the plugin).

    The class (that should not be there) is in the following sections:

    “Bases y condiciones”
    “Inscribite”
    “FOTOS”

    My guess is that when you cloned the sections, this class was also copied(?)
    Can you check if you can remove it? Maybe Elementor lets you view/edit the HTML code?

    Thread Starter gfdesign

    (@gfdesign)

    Hi @malihu
    Sorry for my delay to reply. Effectively, you’re right. I removed all clases in my sections. I got confused because Elementor allows add ‘Page scroll to id’ as element, and that was I did. Now, I’ve added IDs to sections and it works. The only thing I couldn’t achieve was the animation it had before. (Now, when user clicks in any section, this doesn’t do the ‘easeInOutQuint’ animation or any other)

    Anyway, the main problem was solved and I really appreciate it. I’ve already ranked your plugin with 5 stars.
    Best regards ??

    Plugin Author malihu

    (@malihu)

    Thank a lot for your review ??

    I see that your theme attaches its own click events for same page links (that’s why the animation easing isn’t working). Try this:

    Go to plugin settings and under “Advanced options” enable/check “Prevent other scripts from handling plugin’s links”. Save changes and check if animation works correctly.

    Let me know

    Thread Starter gfdesign

    (@gfdesign)

    Hi @malihu.
    Thanks for your fast reply. You’re right, it’s something related to the theme (in our case it’s GeneratePress PRO version) since we swaped it for an instant to another theme as Twenty Fifteen and the animation works as expect.

    Unfortunately enabling ‘Prevent other scripts from handling plugin’s links’ option doesn’t work, but what I am going to do is to report this issue to GeneratePress support and to see if they can help us. If I am able to solve it, I’ll let you know.

    Once again, thanks for your time and excellent support.
    Best regards

    Plugin Author malihu

    (@malihu)

    You’re welcome.

    The theme script that that handles the links is:

    /5v5/wp-content/plugins/elementor/assets/js/frontend.min.js

    This script is minified so I can’t provide an exact line of the function that we’re looking for. My best guess is the following:

    Within the code, there’s this text:

    'a[href*="#"]'

    If you can edit frontend.min.js and change the text/selector above to:

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

    it might fix the issue.

    So try to edit the file and search and replace 'a[href*="#"]' with 'a[href*="#"]:not(._mPS2id-h)' (there’s only 1 match in the whole script).

    Hope this helps

    Thread Starter gfdesign

    (@gfdesign)

    You’re a genius. Changing that, works!. What I can’t realize is why it does not happen when I change the theme since the menu still remains done with Elementor. Anyway, would you know how to apply your change into functions.php file of my child theme in order don’t lost it in future plugin updates?
    Best regards and thanks for your time.

    FYI, there is a not minified version of that file:
    5v5/wp-content/plugins/elementor/assets/js/frontend.js

    • This reply was modified 6 years, 12 months ago by gfdesign.
    Plugin Author malihu

    (@malihu)

    Cool ??

    I can’t really say why it doesn’t happen when you change the theme. Maybe the Twenty Fifteen theme loads frontend.js before “Page scroll to id” scripts and doesn’t affect animation(?)
    I’d have to see your page with the other theme in order to see what exactly happens.

    I think it’s better to ask Elementor developer(s) how to keep the modified frontend.js. Maybe you can deregister the frontend script (in functions.php) and then copy it to your child theme’s dir (along with the mods you made) and register the copy.

    I would first ask the developer though so nothing breaks.

    Thread Starter gfdesign

    (@gfdesign)

    Perfect @malihu
    I’ll let you know if I advance with this issue.
    Anyway, You’ve been a great help.
    Best regards and keep going this great plugin.
    Many thanks

    Plugin Author malihu

    (@malihu)

    You’re welcome. Thanks for your comments ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Last two menu items are not highlighted’ is closed to new replies.