Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is how I did it;</p> <p>1) firstly I disabled my JQM routing like so in a file called plugins.js;</p> <pre><code>$(document).bind("mobileinit", function() { /** * check out http://coenraets.org/blog/2012/03/using-backbone-js-with-jquery-mobile/ for more details */ $.mobile.ajaxEnabled = false; $.mobile.linkBindingEnabled = false; $.mobile.hashListeningEnabled = false; $.mobile.pushStateEnabled = false; }); </code></pre> <p>This code was loaded before I loaded JQM, like so;</p> <pre><code> &lt;script src="//code.jquery.com/jquery-1.9.1.min.js"&gt;&lt;/script&gt; &lt;script src="js/plugins.js"&gt;&lt;/script&gt; &lt;script src="//code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"&gt;&lt;/script&gt; &lt;script src="js/vendor/sammy/sammy.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt; &lt;script src="js/vendor/sammy/plugins/sammy.template.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt; &lt;script src="js/main.js"&gt;&lt;/script&gt; </code></pre> <p>Then my main.js function looks like this;</p> <pre><code>(function($) { var app = $.sammy('#main', function() { this.use('Template'); this.get('#/', function(context) { context.load('/templates/index.template', function() { $("#container").trigger('pagecreate'); }).appendTo(context.$element()); }); this.get('#/landing', function(context) { context.load('/templates/landing.template', function() { $("#container").trigger('pagecreate'); }).replace(context.$element()); }); }); $(function() { app.run('#/'); }); })(jQuery); </code></pre> <p>I think you are not far off on your code snippet above. NB you have your $(document).ready function as a callback to appendTo, which does not take a callback. You will see mine is in load() which does</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload