From 884c6603c9e27b303227cdf964a8a502b44a9198 Mon Sep 17 00:00:00 2001 From: OMAR ELGABRY Date: Wed, 13 Feb 2019 16:20:24 -0800 Subject: [PATCH] Stop propagation on collapse In case you have a card inside another. --- dist/assets/js/scripts.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dist/assets/js/scripts.js b/dist/assets/js/scripts.js index d772836..8c145e2 100644 --- a/dist/assets/js/scripts.js +++ b/dist/assets/js/scripts.js @@ -410,10 +410,12 @@ $(function() { me.click(function() { $(target).collapse('toggle'); - $(target).on('shown.bs.collapse', function() { + $(target).on('shown.bs.collapse', function(e) { + e.stopPropagation(); me.html(''); }); - $(target).on('hidden.bs.collapse', function() { + $(target).on('hidden.bs.collapse', function(e) { + e.stopPropagation(); me.html(''); }); return false; @@ -581,4 +583,4 @@ $(function() { } }); } -}); \ No newline at end of file +});