Advertisement
Guest User

Untitled

a guest
Apr 10th, 2012
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Title</title>
  5.  
  6. <meta name="viewport" content="width=device-width; initial-scale=1.0;" />
  7.  
  8.  
  9. <meta name="apple-mobile-web-app-capable" content="yes" />
  10.  
  11. <meta names="apple-mobile-web-app-status-bar-style" content="black-translucent" />
  12.  
  13.  
  14. <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
  15. <!-- <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>-->
  16. <script src="http://code.jquery.com/jquery-latest.js"></script>
  17. <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
  18. <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
  19. </head>
  20. <body>
  21.  
  22. <script type="text/javascript">
  23.  
  24.  
  25.  
  26. jQuery(function($) {
  27. //always include jquery code in $(document).ready(){ your javascript here} loads faster
  28. setInterval(function() {
  29. //apologies... i didn include setInterval() function
  30. $.getJSON('list.php', function(json) {
  31. //assuming list.php resides with list.html directory
  32. //console.log(json)
  33. console.log(json[0].key1);
  34. console.log(json[0].key2);
  35.  
  36. });
  37. }, 15000); //request list.php every 15 seconds
  38. });
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45. </script>
  46. </head>
  47. <body>
  48.  
  49. <div data-role="page">
  50.  
  51. <div data-role="header" data-position="inline">
  52. <h1>Title</h1>
  53. </div>
  54.  
  55. <div data-role="content">
  56.  
  57. <div id="myDiv" data-role="collapsible" data-theme="b" data-content-theme="d" data-collapsed="true"></div>
  58.  
  59. </div>
  60.  
  61.  
  62.  
  63. </div>
  64. </div>
  65.  
  66. </body>
  67. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement