Title: Javascript problem (and fix) with accept button
Last modified: May 31, 2018

---

# Javascript problem (and fix) with accept button

 *  Resolved [pelzi](https://wordpress.org/support/users/pelzi/)
 * (@pelzi)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/javascript-problem-and-fix-with-accept-button/)
 * I’m facing a strange problem: with the published version of js/scripts.js, the
   accept button does not work with any browser I heard of. Instead, it triggers
   a JavaScript exception that “on” is not a function.
    It’s easy to fix:
 * < $(‘#pea_cook_btn, .eucookie’).on(‘click’, function () {
    > $(‘#pea_cook_btn,.
   eucookie’).click(function () {
 * But I have no clue why it would work for any other installation?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjavascript-problem-and-fix-with-accept-button%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Marco Milesi](https://wordpress.org/support/users/milmor/)
 * (@milmor)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/javascript-problem-and-fix-with-accept-button/#post-10381659)
 * Hi [@pelzi](https://wordpress.org/support/users/pelzi/),
    fix accepted, will 
   be included in next release!

Viewing 1 replies (of 1 total)

The topic ‘Javascript problem (and fix) with accept button’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/eu-cookie-law_39293e.svg)
 * [EU Cookie Law for GDPR/CCPA](https://wordpress.org/plugins/eu-cookie-law/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/eu-cookie-law/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/eu-cookie-law/)
 * [Active Topics](https://wordpress.org/support/plugin/eu-cookie-law/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/eu-cookie-law/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/eu-cookie-law/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Marco Milesi](https://wordpress.org/support/users/milmor/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/javascript-problem-and-fix-with-accept-button/#post-10381659)
 * Status: resolved