mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
Added an index page for the dynamic-samples directory and linked to it from the age-dynamic.html page.
This commit is contained in:
parent
92699e0011
commit
675657f877
2 changed files with 25 additions and 1 deletions
24
docs/pages/dynamic-samples/index.html
Normal file
24
docs/pages/dynamic-samples/index.html
Normal file
|
|
@ -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>
|
||||
|
|
@ -255,7 +255,7 @@ function showCategory( urlObj, options )
|
|||
<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 -->
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue