X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/71209be8f9c399340bddb819f71e99ecf116187b..76a5ef1307add0a97470e8927e2b3165a8d95b29:/wolnelektury/static/js/base.js diff --git a/wolnelektury/static/js/base.js b/wolnelektury/static/js/base.js index 36a85d06f..7af03709d 100755 --- a/wolnelektury/static/js/base.js +++ b/wolnelektury/static/js/base.js @@ -61,6 +61,23 @@ + (function() { + var $current = null; + $('.hidden-box-wrapper').each(function() { + var $hidden = $('.hidden-box', this); + $('.hidden-box-trigger', this).click(function(event) { + event.preventDefault(); + if ($current == $hidden) { + $current = null; + $hidden.hide('fast'); + } else { + $current && $current.hide('fast'); + $hidden.show('fast'); + $current = $hidden; + } + }); + }); + })();