X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/9bc86f5a6542c5893ac94284da33162a7c7be2d6..ce097db0af8c96297501b569ec49477b76c1ceec:/src/wolnelektury/static/js/main.js?ds=sidebyside diff --git a/src/wolnelektury/static/js/main.js b/src/wolnelektury/static/js/main.js index d231b40a6..efa442e12 100644 --- a/src/wolnelektury/static/js/main.js +++ b/src/wolnelektury/static/js/main.js @@ -323,7 +323,7 @@ button.on('click', function() { let dataLabel = $(this).attr('data-label'); let dataAction = $(this).attr('data-action'); - $(this).parent().find('.l-article__overlay').toggleClass('is-clicked'); + $(this).parent().parent().find('.l-article__overlay').toggleClass('is-clicked'); if($(this).text() === dataLabel) { $(this).text(dataAction); } else { @@ -543,4 +543,10 @@ $(".c-media__settings").toggleClass('active'); }); + const crisis = document.querySelector(".annoy-banner_crisis-container"); + const crisisLink = document.querySelector('.annoy-banner_crisis-container a.action'); + crisis.addEventListener("click", function() { + crisisLink.click(); + }); + })();