How to use jQuery Mobile and Backbone JS together in one app?

前端 未结 4 450
轻奢々
轻奢々 2021-01-30 14:43

I\'ve been enjoying using Backbone JS for a iPad HTML5 project... But I\'m quickly running into a issue of needing iPad-ish transitions, form elements etc. After looking around,

相关标签:
4条回答
  • 2021-01-30 15:15

    I think I found a solution when I asked the same question.

    Disable the hash change controller in JQuery mobile UI and replace with backbone.js

    There looks to be an option to disable JQuery hash change listening on a recent checking.

    https://github.com/jquery/jquery-mobile/commit/3162428558efd9960739ef8f00a7ead0dbf6d3ec

    I have not tried it yet though. If it works please let us know.

    Brad

    0 讨论(0)
  • 2021-01-30 15:23

    i prefer something more integrated w/ jquery mobile, so i usually replace backbone's router with this one: github.com/azicchetti/jquerymobile-router . works nicely

    0 讨论(0)
  • 2021-01-30 15:30

    It seems that the JQuery Mobile team has made a conscious decision to not support the sort of dynamic applications the Backbone.js targets. From the alpha 4 release notes:

    After 1.0 is out, the project be focusing on ... dynamic applications, expanded widget set, and ... A more detailed roadmap is underway and we’ll share it as we get closer to our 1.0 release.

    Further evidence for this is the removal of the autoInitialize option as they went from alpha 3 to alpha 4: issue 1391

    So for now, we need workarounds. An alternative answer is to help fix outstanding JQM bugs and push it closer to 1.0, so we can get dynamic application features into JQM ASAP.

    0 讨论(0)
  • 2021-01-30 15:38

    Found this and it worked perfectly for me: Redirect from mobile site (jQuery mobile) to main site styles linger

    I was redirecting to the main site and it kept throwing "Backbone history started" errors

    0 讨论(0)
提交回复
热议问题