X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/94924a2ca60f4f045c739cdb19d859cdcf8959af..cb40f164b028883a2fc061307383d0aa98f8b609:/wolnelektury/static/js/base.js diff --git a/wolnelektury/static/js/base.js b/wolnelektury/static/js/base.js index 34f850097..7c02f030a 100755 --- a/wolnelektury/static/js/base.js +++ b/wolnelektury/static/js/base.js @@ -73,7 +73,21 @@ } }); }); + $('body').click(function(e) { + if ($current == null) return; + var p = $(e.target); + while (p.length) { + if (p == $current) + return; + if (p.hasClass('hidden-box-trigger')) + return; + p = p.parent(); + } + $current.hide('fast'); + $current = null; + }); })(); +