diff --git a/commerce_stripe.js b/commerce_stripe.js index 1944a3d..150f955 100755 --- a/commerce_stripe.js +++ b/commerce_stripe.js @@ -9,7 +9,7 @@ if (settings.stripe.fetched == null) { settings.stripe.fetched = true; - $('#edit-continue').live('click', function(event) { + $('body').delegate('#edit-continue', 'click', function(event) { // Prevent the Stripe actions to be triggered if Stripe is not selected. if ($("input[value*='commerce_stripe|']").is(':checked')) { @@ -83,7 +83,7 @@ $('.checkout-processing').hide(); } else { - var form$ = $("#edit-continue").parents("form"); + var form$ = $("#edit-continue").closest("form"); // Token contains id, last4, and card type. var token = response['id']; // Insert the token into the form so it gets submitted to the server.