X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/592c9401b18118e01de250d44878b9289b138f9c..fd1a9915dd65789cccf27041a1f01cd4077273fc:/src/wolnelektury/static/2021/scripts/main.js?ds=sidebyside diff --git a/src/wolnelektury/static/2021/scripts/main.js b/src/wolnelektury/static/2021/scripts/main.js index 99a7fc7a6..1ffea17c8 100644 --- a/src/wolnelektury/static/2021/scripts/main.js +++ b/src/wolnelektury/static/2021/scripts/main.js @@ -148,28 +148,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('');