mirror of
https://github.com/10h30/woo-viet.git
synced 2026-06-05 15:09:49 +09:00
cf7bf361c1
Issue #17 - Arrange the address fields to the Vietnam standard: Country - Province - District - Address
14 lines
395 B
JavaScript
14 lines
395 B
JavaScript
(function($) {
|
|
$('#billing_country_field').on('change', function() {
|
|
|
|
// Get country code
|
|
var country_code = $(this).find('#billing_country').val();
|
|
|
|
// Match country code with Vietnam
|
|
if(country_code == 'VN') {
|
|
$('.woocommerce-billing-fields__field-wrapper').addClass('active');
|
|
} else {
|
|
$('.woocommerce-billing-fields__field-wrapper').removeClass('active');
|
|
}
|
|
})
|
|
})(jQuery) |