Rails jquery mobile Routing/Rendering Issue

前端 未结 2 1916
感动是毒
感动是毒 2021-01-27 06:24

I\'m following a tutorial http://fuelyourcoding.com/getting-started-with-jquery-mobile-rails-3/ transforming the views in a straightforward scaffolded Rails 3 application into a

相关标签:
2条回答
  • 2021-01-27 06:56

    jQuery Mobile loads pages via AJAX, adds them to the DOM, and then enhances them with all the jQuery Mobile styling. Because of this method of loading pages via AJAX, the source for the page does not change as a user navigates around the site.

    To view the source code for the current page you need to refresh the webpage.

    I recommend reading the jQuery Mobile Documentation for AJAX Navigation: http://jquerymobile.com/demos/1.0rc2/docs/pages/page-navmodel.html

    0 讨论(0)
  • 2021-01-27 07:17

    Add this to your layout. It forces the browser cache to update the URL.

    <div data-role="page" id="home" data-url="<%= request.path %>">
    
    0 讨论(0)
提交回复
热议问题