Advertisement
Guest User

Untitled

a guest
Jul 1st, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. <div data-role="page" id="bedroom">
  2.  
  3. <br>
  4. <a id="titlu">Bedroom</a>
  5. <br>
  6.  
  7. <a href="#statistics" id="stats">Statistics</a>
  8. <a href="#realtime" id="real">Real-time</a>
  9. <hr>
  10.  
  11. <div data-show="hide" id="statistics">
  12. <center><h1>1</h1></center>
  13. <br>
  14. </div>
  15.  
  16. <div data-show="hide" id="realtime">
  17. <center><h1>2</h1></center>
  18. <br>
  19. </div>
  20.  
  21. </div>
  22.  
  23. <div data-role="page" id="living">
  24. <br>
  25. <a id="titlu">Living room</a>
  26. <br>
  27.  
  28. <a href="#statistics2" id="stats2">Statistics</a>
  29. <a href="#realtime2" id="real2">Real-time</a>
  30. <hr>
  31.  
  32. <div data-show="hide" id="statistics2">
  33. <center><h1>1</h1></center>
  34. <br>
  35. </div>
  36.  
  37. <div data-show="hide" id="realtime2">
  38. <center><h1>2</h1></center>
  39. <br>
  40. </div>
  41.  
  42. </div>
  43.  
  44. css
  45.  
  46. #real{
  47. text-align:center;
  48. text-decoration:none;
  49. margin-left: 5%;
  50. font-style:"Times New Roman";
  51. font-size:20px;
  52. color:#000;
  53. background-color: #EEEEEE;
  54. width: 30%;
  55. }
  56.  
  57. #stats{
  58. text-align:center;
  59. text-decoration:none;
  60. color:#000;
  61. margin-left: 5%;
  62. font-style:"Times New Roman";
  63. font-size:20px;
  64. background-color: #EEEEEE;
  65.  
  66.  
  67. }
  68. #real2{
  69. text-align:center;
  70. text-decoration:none;
  71. margin-left: 5%;
  72. font-style:"Times New Roman";
  73. font-size:20px;
  74. color:#000;
  75. background-color: #EEEEEE;
  76. width: 30%;
  77. }
  78.  
  79. #stats2{
  80. text-align:center;
  81. text-decoration:none;
  82. color:#000;
  83. margin-left: 5%;
  84. font-style:"Times New Roman";
  85. font-size:20px;
  86. background-color: #EEEEEE;
  87.  
  88.  
  89. }
  90. #titlu{
  91. text-align:center;
  92. text-decoration:none;
  93. margin-left: 2%;
  94. font-style:"Times New Roman";
  95. font-size:30px;
  96.  
  97. }
  98. [data-show=hide]{
  99. display:none;
  100. }
  101.  
  102. javascript
  103.  
  104. $("#stats").click(this.schimbastat);
  105. $("#real").click(this.schimbareal);
  106. $("#stats2").click(this.schimbastat2);
  107. $("#real2").click(this.schimbareal2);
  108.  
  109. schimbastat:function(){
  110.  
  111. $("#realtime").attr("data-show","hide");
  112. $("#statistics").removeAttr("data-show");
  113.  
  114. },
  115. schimbareal:function(){
  116. $("#realtime").removeAttr("data-show");
  117. $("#statistics").attr("data-show","hide");
  118.  
  119.  
  120. },
  121. schimbastat2:function(){
  122.  
  123. $("#realtime2").attr("data-show","hide");
  124. $("#statistics2").removeAttr("data-show");
  125.  
  126. },
  127. schimbareal2:function(){
  128. $("#realtime2").removeAttr("data-show");
  129. $("#statistics2").attr("data-show","hide");
  130.  
  131.  
  132. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement