{"action":"created","issue":{"url":"https://api.github.com/repos/reed/turbolinks-compatibility/issues/47","labels_url":"https://api.github.com/repos/reed/turbolinks-compatibility/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/reed/turbolinks-compatibility/issues/47/comments","events_url":"https://api.github.com/repos/reed/turbolinks-compatibility/issues/47/events","html_url":"https://github.com/reed/turbolinks-compatibility/issues/47","id":51937520,"number":47,"title":"jQuery Mobile with Stripe Checkout and Rails","user":{"login":"sealocal","id":4951910,"avatar_url":"https://avatars.githubusercontent.com/u/4951910?v=3","gravatar_id":"","url":"https://api.github.com/users/sealocal","html_url":"https://github.com/sealocal","followers_url":"https://api.github.com/users/sealocal/followers","following_url":"https://api.github.com/users/sealocal/following{/other_user}","gists_url":"https://api.github.com/users/sealocal/gists{/gist_id}","starred_url":"https://api.github.com/users/sealocal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sealocal/subscriptions","organizations_url":"https://api.github.com/users/sealocal/orgs","repos_url":"https://api.github.com/users/sealocal/repos","events_url":"https://api.github.com/users/sealocal/events{/privacy}","received_events_url":"https://api.github.com/users/sealocal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-12-15T00:03:26Z","updated_at":"2015-01-22T09:12:10Z","closed_at":null,"body":"I'd like to see a solution loading Stripe Checkout into a single jQuery Mobile \"page\".\r\n\r\nI am using Rails and jQuery Mobile for my app.  I would like to be able to load Checkout.js only on the payment page.\r\n\r\nIf I load Checkout with the `script` tag on a jQM page\r\n\r\n    <script src=\"https://checkout.stripe.com/checkout.js\"></script>\r\n\r\nthen I get `Uncaught ReferenceError: StripeCheckout is not defined` in my browser console.\r\n\r\nThe only way I have solved this problem is by including the `<script>` in the `<head>` of my `layouts/application.html.erb`.  However, since my users will only use the payment form once as a customer, I do not want to load in other pages of my app.\r\n\r\nPlease share your approach if you've used jQM, Stripe Checkout, and Turbolinks successfully!"},"comment":{"url":"https://api.github.com/repos/reed/turbolinks-compatibility/issues/comments/70991135","html_url":"https://github.com/reed/turbolinks-compatibility/issues/47#issuecomment-70991135","issue_url":"https://api.github.com/repos/reed/turbolinks-compatibility/issues/47","id":70991135,"user":{"login":"sealocal","id":4951910,"avatar_url":"https://avatars.githubusercontent.com/u/4951910?v=3","gravatar_id":"","url":"https://api.github.com/users/sealocal","html_url":"https://github.com/sealocal","followers_url":"https://api.github.com/users/sealocal/followers","following_url":"https://api.github.com/users/sealocal/following{/other_user}","gists_url":"https://api.github.com/users/sealocal/gists{/gist_id}","starred_url":"https://api.github.com/users/sealocal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sealocal/subscriptions","organizations_url":"https://api.github.com/users/sealocal/orgs","repos_url":"https://api.github.com/users/sealocal/repos","events_url":"https://api.github.com/users/sealocal/events{/privacy}","received_events_url":"https://api.github.com/users/sealocal/received_events","type":"User","site_admin":false},"created_at":"2015-01-22T09:12:10Z","updated_at":"2015-01-22T09:12:10Z","body":"I think the question is actually:\r\n\r\n**How do I load _any_ remote/external JavaScript file when loading a new jQM page into the DOM?**\r\n\r\nI don't know if this is common knowledge or easily found elsewhere, but I just haven't been able to figure it out - especially with knowing that it's possible that Turbolinks could be my problem as well."}}