Skip to content

Instantly share code, notes, and snippets.

@denmch
Last active June 5, 2016 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save denmch/111694905b7ccaac07bd01c57048c3fb to your computer and use it in GitHub Desktop.
Save denmch/111694905b7ccaac07bd01c57048c3fb to your computer and use it in GitHub Desktop.
On certain browsers on Android devices, the country and state dropdowns for express checkout on Bigcommerce can't be selected. This is a Band-Aid to allow those users to make purchases till the real problem is solved. It simply replaces the dropdown with a plain text input in both the billing and shipping sections.
/* Temporary fix for BigCommerce express checkout issue re: state dropdown menu */
$(document).ajaxComplete(function() {
if ($('#uniform-FormField_12').hasClass('selector')) {
$('#uniform-FormField_12').
removeClass('selector').
empty().
append('<input type="text" name="FormField[2][12]" id="FormField_12" aria-required="1" class="FormField JSHidden Field200 field-xlarge Textbox"></input>');
}
if ($('#uniform-FormField_22').hasClass('selector')) {
$('#uniform-FormField_22').
removeClass('selector').
empty().
append('<input type="text" name="FormField[3][22]" id="FormField_22" aria-required="1" class="FormField JSHidden Field200 field-xlarge Textbox"></input>');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment