Page 31 - JqueryMobile_Manual
P. 31

31

                 <div data-role="header">
                   <a href="#" class="ui-btn ui-corner-all ui-shadow ui-icon-home ui-btn-icon-left">Home</a>
                   <h1>Welcome To My Homepage</h1>
                   <a href="#" class="ui-btn ui-corner-all ui-shadow ui-icon-search ui-btn-icon-left">Search</a>
                 </div>

                  <div data-role="main" class="ui-content">
                   <p>Notice that we have added the CSS class of "ui-corner-all" and "ui-shadow" to the header buttons, to
               make them look a bit more desirable.</p>
                 </div>
               </div>

               </body>
               </html>

                                       Add a button to the left side in the header
                                                   tryjqmob_header_left.html
               <!DOCTYPE html>
               <html>
               <head>
               <meta name="viewport" content="width=device-width, initial-scale=1">
               <link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
               <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
               <script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
               </head>
               <body>

               <div data-role="header">
                 <a href="#" class="ui-btn ui-btn-left ui-corner-all ui-shadow ui-icon-home ui-btn-icon-left">Home</a>
                 <h1>Welcome To My Homepage</h1>
               </div>

               </body>
               </html>

                                      Add a button to the right side in the header
                                                   tryjqmob_header_class.html
               <!DOCTYPE html>
               <html>
               <head>
               <meta name="viewport" content="width=device-width, initial-scale=1">
               <link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
               <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
               <script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
               </head>
               <body>

               <div data-role="page">
                 <div data-role="header">
                   <h1>Welcome To My Homepage</h1>
                   <a href="#" data-role="button" class="ui-btn-right" data-icon="search">Search</a>
                 </div>
               </div>

               </body>
               </html>
   26   27   28   29   30   31   32   33   34   35   36