Last active
June 5, 2016 09:21
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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