Adoretuts

  • home
  • CSS
  • Dropdown
    • Action
    • Another action
    • Something else here
    • Separated link

Sabtu, 28 Juni 2014

Tutorial - How to Make Android Application with Jquerymobile - Step 2 - Header, main, footer, and pages

Diposting oleh Unknown di 14.07 Label: jquerymobile
Share this
Tweet
adoretuts.blogspot.com - jquerymobile

Tutorial  2 – Header, main, footer, and pages

After you learn tutorial  1 - basic, now go to Step 2 – Header, main, footer, and pages

1. Make div data-role="page" in body
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/jquery.mobile-1.4.2.min.css">
<script src="js/jquery-1.10.2.min.js"></script>

<script src="js/jquery.mobile-1.4.2.min.js"></script>
</head>
<body>
 <div data-role="page">
 </div>
</body>
</html>
2. Make div data-role="header", in div data-role="page"
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/jquery.mobile-1.4.2.min.css">
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/jquery.mobile-1.4.2.min.js"></script>
</head>
<body>
 <div data-role="page">
    <div data-role="header">
      <h1>this is header</h1>
    </div>
 </div>
</body>
</html>

Make sure that code is right, and the result is like this.

adoretuts.blogspot.com


* custom for header
 <div data-role="header" data-position="fixed">
This script make your header always on top.

3. Make div data-role="main", in div data-role="page"
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/jquery.mobile-1.4.2.min.css">
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/jquery.mobile-1.4.2.min.js"></script>
</head>
<body>
 <div data-role="page">
    <div data-role="header">
      <h1>this is header</h1>
    </div>
  <div data-role="main" class="ui-content">
   <h3>This is content</h3>
  </div>
 </div>
</body>
</html>
Make sure that code is right, and the result is like this.

adoretuts.blogspot.com


4. Make div data-role="footer", in div data-role="page"
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/jquery.mobile-1.4.2.min.css">
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/jquery.mobile-1.4.2.min.js"></script>
</head>
<body>
 <div data-role="page">
    <div data-role="header">
      <h1>this is header</h1>
    </div>
  <div data-role="main" class="ui-content">
   <h3>This is content</h3>
  </div>
  <div data-role="footer">
   <h3>This is footer</h3>
  </div>
 </div>
</body>
</html>
Make sure that code is right, and the result is like this.

adoretuts.blogspot.com


* custom for footer
<div data-role="footer" data-position="fixed">
This script make your footer always at bottom.

adoretuts.blogspot.com


5. adding pages in jquerymobile

Adding pages in jquerymobile is very simple, just make unique id to separate pages and then create a text link to connect each pages like this
<div data-role="page" id="pageone">
  <div data-role="main" class="ui-content">
    <a href="#pagetwo">Go to Page Two</a>
  </div>
</div>

<div data-role="page" id="pagetwo">
  <div data-role="main" class="ui-content">
    <a href="#pageone">Go to Page One</a>
  </div>
</div>
Make sure that code is right, and the result is like this.

adoretuts.blogspot.com


adoretuts.blogspot.com


Okay now go to Step 3 – Button and Navbar

Navigation Links:

Step 1 - Basic
Step 2 - Header, main, footer, and pages
Step 3 – Button and Navbar
Step 4 – Transition Effect and Panel

Posting Lebih Baru Posting Lama

Tidak ada komentar :

Posting Komentar

Langganan: Posting Komentar ( Atom )

Search this website

Email updates

Popular Posts

  • Change theme jquerymobile
    To apply theme you must copy this data-theme="?" in <div data-role="page" > There is 3 choice theme : a. Th...
  • Tutorial - How to Make Android Application with Jquerymobile - Step 1 - Basic
    Hi everybody, It is my first post in this blog, okay in this occasion I will share to you about "HOW TO MAKE ANDROID APPLICATION wi...
  • Tutorial - How to Make Android Application with Jquerymobile - Step 3 - Button and Navbar
    Step 3 – Button and Navbar After you learn Step 2 – Header, main, footer, and pages . Now go to Step 3 –Button and Navbars. 1. Creati...
  • Tutorial - How to Make Android Application with Jquerymobile - Step 4 - Transition Effects
    Step 4 – Transition Effects An awesome application must have an unique transition effect, Transition effect can be applied to inter...
  • Tutorial - How to Make Android Application with Jquerymobile - Step 2 - Header, main, footer, and pages
    Tutorial  2 – Header, main, footer, and pages After you learn tutorial  1 - basic, now go to Step 2 – Header, main, footer, and pages...
  • Make Navigation Navbar
    First, make id into body file html, to add some page. <body> <div data-role="page" id="pageone">   ...

Facebook page

Google +

Blog Archive

  • 2014 ( 6 )
    • Juli ( 2 )
    • Juni ( 4 )
      • Tutorial - How to Make Android Application with Jq...
      • Tutorial - How to Make Android Application with Jq...
      • Tutorial - How to Make Android Application with Jq...
      • Tutorial - How to Make Android Application with Jq...

Labels

  • jquerymobile

© Adoretuts 2014 . Powered by Blogger templates and RWD Testing Tool