Advertisement
joris

jqm

May 6th, 2013
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.93 KB | None | 0 0
  1. app.js
  2. ==============================================================
  3. $(document).on("mobileinit", function () {
  4.    $.mobile.defaultPageTransition = "none";
  5.     $.extend(  $.mobile , {
  6.        ajaxEnabled: false,
  7.        hashListeningEnabled: false
  8.    });
  9. });
  10.  
  11. $(document).on('pagebeforeshow', "#index",function () {
  12.     $(document).on('click', "#FormRegister",function () {    
  13.         $.mobile.changePage('register.html', {
  14.             dataUrl : "register.html",
  15.                 reloadPage : false,
  16.                 changeHash : true
  17.         });
  18.     });
  19. });
  20.  
  21. $(document).on('pagebeforeshow', "#Register",function () {
  22.     $(document).on('click', "#register_now",function () {    
  23.         RegisterProccess();
  24.     });
  25. });
  26.  
  27. function RegisterProccess(){
  28.     //Ajax Proses Here
  29. }
  30.  
  31.  
  32.  
  33.  
  34. index.html
  35. ==============================================================
  36. <!DOCTYPE html>
  37. <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
  38. <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
  39.   <html>
  40.     <head>
  41.     <meta charset="utf-8" />
  42.     <meta name="viewport" content="widdiv=device-widdiv, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  43.     <meta name="apple-mobile-web-app-capable" content="yes" />
  44.     <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  45.     <title>Home Page</title>
  46.     <link rel="stylesheet"  href="css/themes/default/jquery.mobile-1.3.1.css">
  47.     <script src="js/jquery.js"></script>
  48.     <script src="app.js"></script>
  49.     <script src="js/jquery.mobile-1.3.1.min.js"></script>
  50.    </head>
  51.    <body>
  52.     <!-- Home -->
  53.     <div data-role="page" id="index" class="jqm-demos">
  54.        
  55.         <div data-role="header" class="jqm-header" data-position="fixed">
  56.         <h1>Index</h1>
  57.     </div><!-- /header -->
  58.        
  59.         <div data-role="content">
  60.            <a href="#" id="FormRegister" data-ajax="false">Login</a>
  61.         </div> <!--content-->
  62.        
  63.     </div><!--page-->
  64.   </body>
  65. </html>
  66.  
  67.  
  68.  
  69.  
  70. register.html
  71. ==============================================================
  72. <!DOCTYPE html>
  73. <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
  74. <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
  75.   <html>
  76.     <head>
  77.     <meta charset="utf-8" />
  78.     <meta name="viewport" content="widdiv=device-widdiv, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  79.     <meta name="apple-mobile-web-app-capable" content="yes" />
  80.     <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  81.     <title>Register Page</title>
  82.     <link rel="stylesheet"  href="css/themes/default/jquery.mobile-1.3.1.css">
  83.     <script src="js/jquery.js"></script>
  84.     <script src="js/jquery.mobile-1.3.1.min.js"></script>
  85.    </head>
  86.    <body>
  87.     <!-- Home -->
  88.     <div data-role="page" id="Register">
  89.        
  90.         <div data-role="header" class="jqm-header" data-position="fixed">
  91.         <h1>Register Page</h1>
  92.     </div><!-- /header -->
  93.        
  94.         <div data-role="content">
  95.            
  96.         </div> <!--content-->
  97.        
  98.     </div><!--page-->
  99.   </body>
  100. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement