Removed .change method for .on( 'change') so that if this field is ever replaced via ajax then the country select still works as expected
This commit is contained in:
parent
c2c1e733ba
commit
dfecc22126
|
@ -82,7 +82,7 @@ jQuery( function( $ ) {
|
||||||
var states_json = wc_country_select_params.countries.replace( /"/g, '"' ),
|
var states_json = wc_country_select_params.countries.replace( /"/g, '"' ),
|
||||||
states = $.parseJSON( states_json );
|
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(),
|
var country = $( this ).val(),
|
||||||
$statebox = $( this ).closest( 'div' ).find( '#billing_state, #shipping_state, #calc_shipping_state' ),
|
$statebox = $( this ).closest( 'div' ).find( '#billing_state, #shipping_state, #calc_shipping_state' ),
|
||||||
|
|
Loading…
Reference in New Issue