$(document).on('click', '#tab-type .list-choice :radio', function(event, isSimulated) {
// Prescription Type
var pstType = $(this).val(), $colADD = PS.$tabs.eq(3).find('.col-add');
if(PS.isSingleVision(pstType)) {
$colADD.find('.form-control').val(PS.data.ADD.defaultValue).valid();
$colADD.addClass('hidden');
} else {
$colADD.removeClass('hidden');
}
if(isSimulated !== true) {
if(PS.isNonRX(pstType)) {
PS.$tabs.eq(3).removeClass('active');
} else {
// VWC-1075
PS.$tabs.eq(3).addClass('active').find(':input:visible:first').focus();
$modal.scrollTop($modal.scrollTop() + PS.$tabs.eq(3).offset().top);
}
}
PS.data.prescriptionType = pstType;
$btnNext.removeClass('hidden');
});
// In another function
PS.$tabs.eq(2).find(':radio').filter(function() {
if(this.value === data.prescriptionType) {
return true;
}
if($(this).closest('label').text().trim() === data.prescriptionType) {
return true;
}
return false;
}).trigger('click', [true]);