// JS Menu
(function () {
let button = $('.js-menu');
- let menu = $('.l-navigation__menu');
+ let menu = $('.l-navigation');
let menuLinks = menu.find('a');
button.on('click', function() {
})();
-//Switch
(function() {
- let $switchOnce = $('#switch-once');
- let $switchMonthly = $('#switch-monthly');
-
- $switchMonthly.on('click', function() {
- $('.l-checkout__payments__box').removeClass('once');
- });
-
- $switchOnce.on('click', function() {
- $('.l-checkout__payments__box').addClass('once');
- });
+ $('.l-checkout__payments__box button').on('click', function() {
+ let container = $(this).closest('.l-checkout__payments');
+ $('input', container).val($(this).val());
+ $('.is-active', container).removeClass('is-active');
+ $(this).closest('.l-checkout__payments__box').addClass('is-active');
+ $('#kwota').val('');
+ return false;
+ });
+
})();
+
//Copy function
(function() {
let $copy = $('.js-copy');