GithubHelp home page GithubHelp logo

Comments (3)

svisamsetty avatar svisamsetty commented on August 17, 2024

have you included the configure to happen only after dom is loaded?

from turbolinks-compatibility.

sealocal avatar sealocal commented on August 17, 2024

@svisamsetty I think my problem is that I don't know how to do that properly with the mixture of Rails / jQuery. I don't understand what I'm missing.

I've tried wrapping my Stripe configure with the line below (where #new_payment is the page id), but it doesn't solve the problem. I don't know how to load the checkout.js with that jQM page (which is a Rails view). I'm not really sure how to express the problem in more detail.

$( '#new_paymet' ).on( 'pagecreate', function( event, ui ) { }

Further, I'm not even sure if that event handler should be defined on the requesting page or the requested page.

from turbolinks-compatibility.

sealocal avatar sealocal commented on August 17, 2024

I think the question is actually:

How do I load any remote/external JavaScript file when loading a new jQM page into the DOM?

I 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.

Edit: I think there is enough information on this SO post. I'll close the issue. If anyone ever wants to see what I end up doing for a solution, just let me know!

http://stackoverflow.com/questions/15800121/why-i-have-to-put-all-the-script-to-index-html-in-jquery-mobile

from turbolinks-compatibility.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.