• Resolved asseti

    (@asseti)


    Hey,

    I’m running into a strange issue on my site. I have a javascript toggleable mobile menu with a jquery click event listener.

    If viewed_cookie_policy has not been set, the menu opens as expected, but once I click “accept all” and viewed_cookie_policy is set to “yes”, a second javascript source appears (VM### filename.js) and duplicates my event listeners, meaning a single click on the menu toggle both opens and closes the menu instantly.

    I suspected it may be a caching issue but disabling my caching plugin (W3 Total Cache) doesn’t resolve the issue, whereas disabling the Cookie Consent plugin does.

    I have also tried disabling “advanced script rendering” but no dice.

    Any ideas? Happy to provide more info if required.

Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Duplicate javascript / event listeners on accept’ is closed to new replies.