JavaScript EU cookie law banner not removing

后端 未结 1 872
悲&欢浪女
悲&欢浪女 2021-01-22 10:28

I\'ve been trying to add a EU cookie policy banner to my website. The javascript code below inserts the banner (once I add a small bit of styling) but when I click on the \"x\"

相关标签:
1条回答
  • 2021-01-22 11:01

    The function removeMe is undefined in the current scope of the onclick handler. To fix this, you should replace this line function removeMe() { with window.removeMe = function removeMe() {.

    Live example (with formatted code): https://jsfiddle.net/xnhpzto8/1/

    0 讨论(0)
提交回复
热议问题