Monday, 9 September 2013

Selecting another script tag with Jquery?

Selecting another script tag with Jquery?

I'm using some JS provided by Stripe to generate a checkout button. I'd
like to dynamically update the amount with JQuery, but don't believe
there's a way to select the script tag? Am I wrong?
<script src="https://checkout.stripe.com/v2/checkout.js"
class="stripe-button"
data-key="<%= Rails.configuration.stripe[:publishable_key] %>"
data-description="A month's subscription"
data-amount="500"></script>
Just using a class selector like $('.stripe-button) hasn't worked.

No comments:

Post a Comment