Last active
May 29, 2017 16:12
-
-
Save apih/27204ca99aea53c353b5941939dcef99 to your computer and use it in GitHub Desktop.
JS code for selecting first shipping region if no shipping region is selected yet in OnPay form
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
<script type="text/javascript"> | |
// Select first shipping region if no shipping region is selected yet | |
if ($("[name='shipping_region']:checked").length === 0) { | |
$("[name='shipping_region']:first").prop("checked", true); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment