From dfecc22126ab59a8488f444fb0f0f65aa8ead06f Mon Sep 17 00:00:00 2001 From: devin Date: Wed, 28 Jan 2015 16:42:11 -0800 Subject: [PATCH] Removed .change method for .on( 'change') so that if this field is ever replaced via ajax then the country select still works as expected --- assets/js/frontend/country-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/frontend/country-select.js b/assets/js/frontend/country-select.js index 3c106d5b938..99712691fd9 100644 --- a/assets/js/frontend/country-select.js +++ b/assets/js/frontend/country-select.js @@ -82,7 +82,7 @@ jQuery( function( $ ) { var states_json = wc_country_select_params.countries.replace( /"/g, '"' ), states = $.parseJSON( states_json ); - $( 'select.country_to_state, input.country_to_state' ).change( function() { + $( 'body' ).on( 'change', 'select.country_to_state, input.country_to_state', function() { var country = $( this ).val(), $statebox = $( this ).closest( 'div' ).find( '#billing_state, #shipping_state, #calc_shipping_state' ),