From c857e8037e0481d9759d4d3f66ce96fe13427620 Mon Sep 17 00:00:00 2001 From: O2 Graphics Date: Thu, 5 Nov 2020 20:47:11 +0100 Subject: [PATCH] Fix buttons not working for dynamically added services --- tarteaucitron.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tarteaucitron.js b/tarteaucitron.js index 16682e1..0a94f60 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -715,6 +715,14 @@ var tarteaucitron = { tarteaucitron.userInterface.css('tarteaucitronNoServicesTitle', 'display', 'none'); tarteaucitron.userInterface.order(service.type); + + tarteaucitron.addClickEventToId(service.key + 'Allowed', function () { + tarteaucitron.userInterface.respond(this, true); + }); + + tarteaucitron.addClickEventToId(service.key + 'Denied', function () { + tarteaucitron.userInterface.respond(this, false); + }); } tarteaucitron.pro('!' + service.key + '=' + isAllowed);