2.0_beta sync to rsa
[framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.1.0 / docs / toolbars / footer-persist-d.html
1 <!DOCTYPE html> 
2 <html>
3         <head>
4         <meta charset="utf-8">
5         <meta name="viewport" content="width=device-width, initial-scale=1"> 
6         <title>jQuery Mobile Framework - Persistent footer C</title> 
7         <link rel="stylesheet"  href="../../css/themes/default/jquery.mobile.css" />  
8         <link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
9
10         <script src="../../js/jquery.js"></script>
11         <script src="../../docs/_assets/js/jqm-docs.js"></script>
12         <script src="../../js/"></script>
13
14 </head> 
15 <body> 
16         <div data-role="page" class="type-interior">
17
18         <div data-role="header" data-theme="f" data-position="fixed" data-id="foo">
19                 <h1>Info</h1>
20                 <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
21                 <a href="../nav.html" data-icon="search" data-iconpos="notext" data-rel="dialog" data-transition="fade">Search</a>
22         </div>
23         
24         <div data-role="content">
25                 <div class="content-primary">
26                 <h2>About persistent toolbars</h2>
27                 <p>These pages are a demo of persistent toolbars. Click on any of the links in the footer, and you'll see the page content transition, but both the persistent header and footer on these pages remains in place durning the animation to a new HTML page.</p>
28                 <p>To tell the framework to apply the persistent behavior, add a <code>data-id</code> attribute to the footer of all HTML pages in the navigation set to the same ID. It's that simple: if the page you're navigating to has a header or footer with the same <code>data-id</code>, the toolbars will appear fixed outside of the transition. Each of these pages has a different transition to test out how this works.</p>
29                 
30                 <p>Typically, the persistent toolbar technique will be combined with fixed positioning. In this example, the footer also has a navbar, like this:</p>
31         
32 <pre><code>     
33 &lt;div data-role=&quot;footer&quot;<strong> data-id=&quot;foo1&quot; data-position=&quot;fixed&quot;</strong>&gt;
34         &lt;div data-role=&quot;navbar&quot;&gt;
35                 &lt;ul&gt;
36                         &lt;li&gt;&lt;a href=&quot;a.html&quot;&gt;Friends&lt;/a&gt;&lt;/li&gt;
37                         &lt;li&gt;&lt;a href=&quot;b.html&quot;&gt;Albums&lt;/a&gt;&lt;/li&gt;
38                         &lt;li&gt;&lt;a href=&quot;c.html&quot;&gt;Emails&lt;/a&gt;&lt;/li&gt;
39                         &lt;li&gt;&lt;a href=&quot;d.html&quot; &gt;Info&lt;/a&gt;&lt;/li&gt;
40                 &lt;/ul&gt;
41         &lt;/div&gt;&lt;!-- /navbar --&gt;
42 &lt;/div&gt;&lt;!-- /footer --&gt;
43 </code></pre>
44                 <p>To set the active state of an item in a persistent toolbar, add a class of <code>ui-state-persist</code> in addition to <code>ui-btn-active</code> to the corresponding anchor.</p>
45                 
46 <pre><code>     
47 &lt;li&gt;&lt;a href=&quot;d.html&quot; <strong>class=&quot;ui-btn-active ui-state-persist&quot;</strong>&gt;Info&lt;/a&gt;&lt;/li&gt;
48 </code></pre>
49
50                 <h3>A note about transitions</h3>
51                 <p>The slide, slideup, slidedown, fade or none <a href="../pages/page-transitions.html">page transitions</a> all work great with persistent fixed toolbars. However, intensive 3D transitions like flip, turn, and flow can cause positioning and animation performance issues with this technique so we don't recommend using them.</p>
52                 
53                 </div><!--/content-primary -->          
54
55                 <div class="content-secondary">
56
57                                 <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
58
59                                                 <h3>More in this section</h3>
60
61                                                 <ul data-role="listview" data-theme="c" data-dividertheme="d">
62
63                                                         <li data-role="list-divider">Toolbars</li>
64                                                         <li><a href="docs-bars.html">Toolbar basics</a></li>
65                                                         <li><a href="docs-headers.html">Header bars</a></li>
66                                                         <li><a href="docs-footers.html">Footer bars</a></li>
67                                                         <li><a href="docs-navbar.html">Navbars</a></li>
68                                                         <li><a href="bars-fixed.html">Fixed positioning</a></li>
69                                                         <li data-theme="a"><a href="footer-persist-a.html">Persistent toolbars</a></li>
70                                                         <li><a href="bars-themes.html">Theming toolbars</a></li>
71
72                                                 </ul>
73                                 </div>
74                         </div>          
75
76                 </div><!-- /content -->
77
78                 <div data-role="footer" data-id="foo1" data-position="fixed">
79                         <div data-role="navbar">
80                                 <ul>
81                                         <li><a href="footer-persist-a.html" data-prefetch="true">Friends</a></li>
82                                         <li><a href="footer-persist-b.html" data-prefetch="true">Albums</a></li>
83                                         <li><a href="footer-persist-c.html" data-prefetch="true">Emails</a></li>
84                                         <li><a href="footer-persist-d.html" data-prefetch="true" data-transition="slideup" class="ui-btn-active ui-state-persist">Info</a></li>
85                                 </ul>
86                         </div><!-- /navbar -->
87                 </div><!-- /footer -->
88
89                 </div><!-- /page -->
90
91                 </body>
92                 </html>