Hello @epipo,
with Chrome I see the following error in console:
Uncaught TypeError: Cannot read property 'smoothScroll' of null at S (main.min.js:1)
I also see that the link that should open the panel has been modified. It should be <a href="#" class="OpenCookiePreferences">Gestion des cookies</a> but it is <a href="#cookies" class="OpenCookiePreferences">Gestion des cookies</a>.
I think that a “scroll plugin” is trying to run some graphic effects on the DOM element with id “cookies”, but there is no element with that id!
Could you exclude the cookie link from the scroll effect system?
Nicola
Hello @nicola,
Thanks for your fast answer! Indeed I have a smooth scroll plugin.
I have disabled it for this link and corrected the javascript error. I have also reverted to an empty hashtag.
However it is still not working, it only jump to the top as it’s the normal behavior of the browser.
Could you tell me a bit more about how the link is targeted? Is it linked to the classname?
Thanks for your help!
-
This reply was modified 7 years, 11 months ago by
Etienne.
Ok @epipo, I have found the problem.
The theme is echoing the footer after the “wp_print_footer_scripts” WordPress hook. The theme should print the footer with the “wp_footer” hook, which runs before the “wp_print_footer_scripts”, as you can see on codex (https://codex.ww.wp.xz.cn/Plugin_API/Action_Reference).
This cause the link to be inserted after the kit has attached the click event to links with the class “OpenCookiePreferences”.
Yep, you’re a genius!! My bad I haven’t realized that…
Thanks a lot for your help 🙂