Backbone.js and jQueryMobile routing without hack or other router

后端 未结 3 1011
独厮守ぢ
独厮守ぢ 2020-12-15 14:05

I am using backbone.js (0.5.3) with JQueryMobile (1.0 beta 2). I know there are routing conflicts when using those libraries together, and I would like to know if there is a

3条回答
  •  余生分开走
    2020-12-15 14:26

    With jquery 1.2.0, disable ajax and linkBinding

    $(document).bind("mobileinit", function(){
        $.mobile.ajaxEnabled = false;
        $.mobile.hashListeningEnabled = false;
        $.mobile.linkBindingEnabled = false;
        $.mobile.pushStateEnabled = false;
      });
    

    after, which with normal Backbone routes, you can link a #id with

    Report
    

提交回复
热议问题