Skip to content

Commit

Permalink
Added an index page for the dynamic-samples directory and linked to i…
Browse files Browse the repository at this point in the history
…t from the age-dynamic.html page.
  • Loading branch information
jblas committed Sep 8, 2011
1 parent 92699e0 commit 675657f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions docs/pages/dynamic-samples/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Dynamic Page Samples</title>
<link rel="stylesheet" href="../../../themes/default/">
<script src="../../../js/jquery.js"></script>
<script src="../../../js/"></script>
</head>

<body>
<div data-role="page">
<div data-role="header"><h1>Categories</h1></div>
<div data-role="content">
<h2>Select a Category Below:</h2>
<ul data-role="listview" data-inset="true">
<li><a href="sample-reuse-page.html" rel="external">Re-using a Page with In-Memory Data</a></li>
<li><a href="sample-reuse-page-external.html" rel="external">Re-using a Page With External Data</a></li>
</ul>
</div>
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/pages/page-dynamic.html
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ <h2>jQuery Mobile and Dynamic Page Generation</h2>
<p>After it injects the markup, it then calls the appropriate jQuery Mobile widget calls to enhance the list markup it just injected. This is what turns the normal list markup into a fully styled listview with all its behaviors.</p>
<p>Once that's done, it then calls $.mobile.changePage(), passing it the DOM element of the page we just modified, to tell the framework that it wants to show that page.</p>
<p>Now an interesting problem here is that jQuery Mobile typically updates the browser's location hash with the URL associated with the page it is showing. Because we are re-using the same page for each category, this wouldn't be ideal, because the URL for that page has no specific category info associated with it. To get around this problem, showCategory() simply sets the dataUrl property on the options object it passes into changePage() to tell it to display our original URL instead.</p>
<p>That's the sample in a nutshell. It should be noted that this particular sample and its usage is not a very good example of an app that degrades gracefully when JavaScript is turned off. We will be posting other examples that demonstrate how to degrade gracefully in the future.</p>
<p>That's the sample in a nutshell. It should be noted that this particular sample and its usage is not a very good example of an app that degrades gracefully when JavaScript is turned off. That means it probably won't work very well on C-Grade browsers. We will be posting other examples that demonstrate how to degrade gracefully in the future. Check this <a href="http://jquerymobile.com/test/docs/pages/dynamic-samples/">page</a> for updates.</p>
</div>
<!--/content-primary -->

Expand Down

0 comments on commit 675657f

Please sign in to comment.