X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/592c9401b18118e01de250d44878b9289b138f9c..b8c235267a6345ebe3891f49c16ad3fc5f1d3f25:/src/wolnelektury/static/2021/scripts/main.js diff --git a/src/wolnelektury/static/2021/scripts/main.js b/src/wolnelektury/static/2021/scripts/main.js index 99a7fc7a6..994900a96 100644 --- a/src/wolnelektury/static/2021/scripts/main.js +++ b/src/wolnelektury/static/2021/scripts/main.js @@ -8,11 +8,13 @@ if(!$(this).hasClass('is-active')) { $(this).addClass('is-active'); menu.addClass('is-open'); + $('body').addClass('is-open'); button.find('.bar').addClass('animate'); menuLinks.attr('tabindex', 0); } else { $(this).removeClass('is-active'); menu.removeClass('is-open'); + $('body').removeClass('is-open'); button.find('.bar').removeClass('animate'); menuLinks.attr('tabindex', -1); } @@ -22,6 +24,7 @@ if (e.keyCode === 27) { button.removeClass('is-active'); menu.removeClass('is-open'); + $('body').removeClass('is-open'); button.find('.bar').removeClass('animate'); menuLinks.attr('tabindex', -1); } @@ -148,28 +151,10 @@ })(); -//Switch (function() { - let $switchOnce = $('#switch-once'); - let $switchMonthly = $('#switch-monthly'); - - $switchMonthly.on('click', function() { - $('.payments-once').hide(); - $('.payments-recurring').show(); - }); - - $switchOnce.on('click', function() { - $('.payments-recurring').hide(); - $('.payments-once').show(); - }); -})(); - - -(function() { - $('.l-checkout__payments__box button').on('click', function() { let container = $(this).closest('.l-checkout__payments'); - $('input', container).val($(this).attr('data-amount')); + $('input', container).val($(this).val()); $('.is-active', container).removeClass('is-active'); $(this).closest('.l-checkout__payments__box').addClass('is-active'); $('#kwota').val('');