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:
devin 2015-01-28 16:42:11 -08:00
parent c2c1e733ba
commit dfecc22126
1 changed files with 1 additions and 1 deletions

View File

@ -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' ),