From 0caf0dca1c66d8d85dc7ca6d7ec0fb687c5119f1 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sat, 27 Oct 2018 15:59:32 +0200 Subject: [PATCH] =?UTF-8?q?dynamisch=20erzeugte=20watson-buttons=20unterst?= =?UTF-8?q?=C3=BCtzen=20(#38)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/watson.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/watson.js b/assets/watson.js index 60f2cb7..104095d 100644 --- a/assets/watson.js +++ b/assets/watson.js @@ -96,14 +96,14 @@ jQuery(function($){ var $watsonOverlay = $('#watson-overlay'); $(document).ready( function() { - $watsonOverlay.click(function(){ hideWatsonAgent(); }); - - $('.watson-btn').click(function(){ - checkWatsonAgent(); - }); + }); + + // support buttons created dynamically + $(document).on('click', '.watson-btn', function(){ + checkWatsonAgent(); }); $(document).keydown(function(e) {