Created
December 28, 2019 13:06
-
-
Save yaleksandr89/f630897c4b105cca6014b4e340458791 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// "Подсвечиваем" выбранный метод доставки (добавляем класс .shipping-method--active) | |
// #simplecheckout_shipping - ближайщий статический элемент, который не изменяется при выполнение aJax | |
var activeInputShippingMethod = $('.shipping-method').find('input:checked'); | |
var activeShippingMethod = activeInputShippingMethod.parents('.shipping-method'); | |
activeShippingMethod.toggleClass('shipping-method--active'); | |
$('#simplecheckout_shipping').on('change', '.shipping-method', function () { | |
function lazySelectActiveItem_ShippingMethod(){ | |
var activeInputShippingMethod = $('.shipping-method').find('input:checked'); | |
var activeShippingMethod = activeInputShippingMethod.parents('.shipping-method'); | |
activeShippingMethod.toggleClass('shipping-method--active'); | |
} | |
setTimeout(lazySelectActiveItem_ShippingMethod, 1000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment