<script>
$( document ).ready(function() {
$( ".t-radio__wrapper-delivery label:first" ).click(function() {
$('.t-radio__wrapper-payment label:first').show();
});
$( ".t-radio__wrapper-delivery label:last" ).click(function() {
$('.t-radio__wrapper-payment label:first').hide();
$(".t-radio__wrapper-payment label:last").click();
});
});
</script>
<style>
.t-radio__wrapper-payment label:nth-child(2){
position: absolute;
z-index: -1;
}
.t-radio__wrapper-payment label.hide-payment{
position: relative;
z-index: 1;
}
</style>
<script>
$( document ).ready(function() {
function checkDelivery(){
let typeDeliv = $('input[name="tildadelivery-type"]:checked').val();
if (typeDeliv == "Доставка СПб"){
$('.t-radio__wrapper-payment label:eq(1)').addClass('hide-payment');
}else{
$('.t-radio__wrapper-payment label:eq(1)').removeClass('hide-payment');
$('.t-radio__wrapper-payment label:eq(0) input').prop('checked', true);
$('.t-radio__wrapper-payment label:eq(0) input').change();
};
};
$('.t706').on('click','input[name="tildadelivery-type"]',function(e){checkDelivery()});
$('.t706').on('focusout','.searchbox-input',function(e){checkDelivery()});
});
</script>
<style>
.t-radio__wrapper-payment label.hide-payment{
position: absolute;
z-index: -1;
}
</style>
<script>
$( document ).ready(function() {
function checkDelivery(){
let oneDeliv = 'Курьером СДЭК до двери';
let typeDeliv = $('input[name="tildadelivery-type"]:checked').val();
if ( typeDeliv == oneDeliv ){
$('.t-radio__wrapper-payment label:eq(0)').addClass('hide-payment');
$('.t-radio__wrapper-payment label:eq(1) input').prop('checked', true);
$('.t-radio__wrapper-payment label:eq(1) input').change();
}else{
$('.t-radio__wrapper-payment label:eq(0)').removeClass('hide-payment');
$('.t-radio__wrapper-payment label:eq(0) input').prop('checked', true);
$('.t-radio__wrapper-payment label:eq(0) input').change();
};
};
$('.t706').on('click','input[name="tildadelivery-type"]',function(e){checkDelivery()});
$('.t706').on('focusout','.searchbox-input',function(e){checkDelivery()});
});
</script>