Tizen 2.0 Release
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.2.0 / docs / toolbars / docs-footers.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 Docs - Footer Configuration</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
17         <div data-role="page" class="type-interior">
18
19                 <div data-role="header" data-theme="f">
20                 <h1>Footers</h1>
21                 <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
22                 <a href="../nav.html" data-icon="search" data-iconpos="notext" data-rel="dialog" data-transition="fade">Search</a>
23         </div><!-- /header -->
24
25         <div data-role="content">
26                 <div class="content-primary">           
27                         <h2>Footer bar structure</h2>
28
29                         <p>The <code>footer</code> bar has the same basic structure as the <a href="docs-headers.html">header</a> except it uses the <code> data-role</code> attribute value of <code>footer</code>. </p> 
30
31 <div class="highlight"> 
32 <pre>
33 <span class="nt">&lt;div</span> <strong><span class="na">data-role=</span><span class="s">"footer"</span></strong><span class="nt">&gt;</span> 
34         <span class="nt">&lt;h4&gt;</span>Footer content<span class="nt">&lt;/h4&gt;</span> 
35 <span class="nt">&lt;/div&gt;</span> 
36 </pre> 
37 </div>
38         
39                         
40                         <p>The <code>footer</code> toolbar will be themed with the "a" swatch by default (black in the default theme) but you can easily <a href="bars-themes.html">set the theme swatch color</a>.</p> 
41                         
42                         <div data-role="footer">
43                                 <h4>Footer content</h4>
44                         </div>
45                         
46                         <p>The page footer is very similar to the header in terms of options and configuration. The primary difference is that the footer is designed to be less structured than the header to allow more flexibility, so the framework doesn't automatically reserve slots for buttons to the left or right as it does in headers.</p>
47                         <p>Since footers do not have the same prescriptive markup conventions as headers, we recommend using layout <a href="../content/content-grids.html">grids</a> or writing custom styles to achieve the design you want.</p> 
48
49
50
51                         <h2>Adding buttons</h2>
52
53                         <p>Any link or valid <a href="../buttons/buttons-types.html">button markup</a> added to the footer will automatically be turned into a button. To save space, buttons in toolbars are automatically set to <a href="../buttons/buttons-inline.html">inline styling</a> so the button is only as wide as the text and icons it contains.  </p>
54                         
55                         <p>By default, toolbars don't have any padding to accommodate nav bars and other widgets. To include padding on the bar, add a <code>class="ui-bar"</code> to the footer.</p>
56                         
57
58 <pre><code>
59 &lt;div data-role=&quot;footer&quot; class=&quot;ui-bar&quot;&gt;
60         &lt;a href=&quot;index.html&quot; data-role=&quot;button&quot; data-icon=&quot;plus&quot;&gt;Add&lt;/a&gt;
61         &lt;a href=&quot;index.html&quot; data-role=&quot;button&quot; data-icon=&quot;arrow-u&quot;&gt;Up&lt;/a&gt;
62         &lt;a href=&quot;index.html&quot; data-role=&quot;button&quot; data-icon=&quot;arrow-d&quot;&gt;Down&lt;/a&gt;
63 &lt;/div&gt;
64 </code></pre>
65
66                         <p>This creates this toolbar with buttons sitting in a row</p>
67
68                         <div data-role="footer" class="ui-bar">
69                                 <a href="index.html" data-icon="plus">Add</a>
70                                 <a href="index.html" data-icon="arrow-u">Up</a>
71                                 <a href="index.html" data-icon="arrow-d">Down</a>
72                         </div>
73                         
74                         </p>Note that <code>.ui-bar</code> should not be added to header or footer bars that span the full width of the page, as the additional padding will cause a full-width element to break out of its parent container. To add padding inside of a full-width toolbar, wrap the toolbar's contents in an element and apply the padding to that element.</p>
75                         
76                         <p>To group buttons together into a button set, wrap the links in a wrapper with <code> data-role=&quot;controlgroup&quot;</code> and <code>data-type=&quot;horizontal&quot;</code> attributes.</p>
77                         
78 <code>&lt;div data-role=&quot;controlgroup&quot; data-type=&quot;horizontal&quot;&gt;</code>
79
80                         <p>This creates a grouped set of buttons:</p>
81
82                         <div data-role="footer" class="ui-bar">
83                                 <div data-role="controlgroup" data-type="horizontal">
84                                         <a href="index.html" data-icon="plus">Add</a>
85                                         <a href="index.html" data-icon="arrow-u">Up</a>
86                                         <a href="index.html" data-icon="arrow-d">Down</a>
87                                 </div>
88                         </div>
89         
90         
91         
92                         <h2>Adding form elements</h2>
93
94                         <p><a href="../forms/forms-all.html">Form</a> elements and other content can also be added to toolbars. Here is an example of a <a href="../forms/selects/index.html">select</a> menu inside a footer bar. We recommend using <a href="../forms/forms-all-mini.html" >mini-sized</a> form elements in toolbars by adding the <code>data-mini="true"</code> attribute:</p>
95                 
96
97                         <div data-role="footer" class="ui-bar">
98                                 <label for="select-choice-1">Shipping:</label>
99                                 <select name="select-choice-1" id="select-choice-1" data-theme="a" data-mini="true">
100                                         <option value="standard">Standard: 7 day</option>
101                                         <option value="rush">Rush: 3 days</option>
102                                         <option value="express">Express: next day</option>
103                                         <option value="overnight">Overnight</option>
104                                 </select>
105                         </div>
106                                 
107                                         
108
109
110
111                                         
112                                         <h2>Fixed &amp; Persistent footers</h2>
113                                         <p>In situations where the footer is a global navigation element, you may want it to appear <a href="bars-fixed.html">fixed</a> so it doesn't scroll out of view. It's also possible to make a fixed toolbar <a href="footer-persist-d.html">persistent</a> so it appears to not move between <a href="../pages/page-transitions.html">page transitions</a>. This can be accomplished by using the persistent footer feature included in jQuery Mobile.</p> 
114                                         
115                                         <p>To make a footer persistent between transitions, add the <code>data-id</code> attribute to the footer of all relevant pages and use the same <code>id</code> value for each. For example, by adding <code>data-id="myfooter"</code> to the current page and the target page, the framework will keep the footer anchors in the same spot during the page animation. <strong>This effect will only work correctly if the header and footer toolbars are set to <code>data-position="fixed"</code> so they are in view during the transition.</strong></p>
116                                         
117                                         
118
119                                         
120
121                                                 </div><!--/content-primary -->          
122
123                                                 <div class="content-secondary">
124
125                                                         <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
126
127                                                                         <h3>More in this section</h3>
128
129                                                                         <ul data-role="listview" data-theme="c" data-dividertheme="d">
130
131                                                                                 <li data-role="list-divider">Toolbars</li>
132                                                                                 <li><a href="docs-bars.html">Toolbar basics</a></li>
133                                                                                 <li><a href="docs-headers.html">Header bars</a></li>
134                                                                                 <li data-theme="a"><a href="docs-footers.html">Footer bars</a></li>
135                                                                                 <li><a href="docs-navbar.html">Navbars</a></li>
136                                                                                 <li><a href="bars-fixed.html">Fixed positioning</a></li>
137                                                                                 <li><a href="footer-persist-a.html">Persistent toolbars</a></li>
138                                                                                 <li><a href="bars-themes.html">Theming toolbars</a></li>
139
140                                                                         </ul>
141                                                         </div>
142                                                 </div>          
143
144                                         </div><!-- /content -->
145
146                                         <div data-role="footer" class="footer-docs" data-theme="c">
147                                                         <p class="jqm-version"></p>
148                                 <p>&copy; 2012 jQuery Foundation and other contributors</p>
149                                         </div>
150
151                                         </div><!-- /page -->
152
153                                         </body>
154                                         </html>