Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div data-role="page" id="bedroom">
- <br>
- <a id="titlu">Bedroom</a>
- <br>
- <a href="#statistics" id="stats">Statistics</a>
- <a href="#realtime" id="real">Real-time</a>
- <hr>
- <div data-show="hide" id="statistics">
- <center><h1>1</h1></center>
- <br>
- </div>
- <div data-show="hide" id="realtime">
- <center><h1>2</h1></center>
- <br>
- </div>
- </div>
- <div data-role="page" id="living">
- <br>
- <a id="titlu">Living room</a>
- <br>
- <a href="#statistics2" id="stats2">Statistics</a>
- <a href="#realtime2" id="real2">Real-time</a>
- <hr>
- <div data-show="hide" id="statistics2">
- <center><h1>1</h1></center>
- <br>
- </div>
- <div data-show="hide" id="realtime2">
- <center><h1>2</h1></center>
- <br>
- </div>
- </div>
- css
- #real{
- text-align:center;
- text-decoration:none;
- margin-left: 5%;
- font-style:"Times New Roman";
- font-size:20px;
- color:#000;
- background-color: #EEEEEE;
- width: 30%;
- }
- #stats{
- text-align:center;
- text-decoration:none;
- color:#000;
- margin-left: 5%;
- font-style:"Times New Roman";
- font-size:20px;
- background-color: #EEEEEE;
- }
- #real2{
- text-align:center;
- text-decoration:none;
- margin-left: 5%;
- font-style:"Times New Roman";
- font-size:20px;
- color:#000;
- background-color: #EEEEEE;
- width: 30%;
- }
- #stats2{
- text-align:center;
- text-decoration:none;
- color:#000;
- margin-left: 5%;
- font-style:"Times New Roman";
- font-size:20px;
- background-color: #EEEEEE;
- }
- #titlu{
- text-align:center;
- text-decoration:none;
- margin-left: 2%;
- font-style:"Times New Roman";
- font-size:30px;
- }
- [data-show=hide]{
- display:none;
- }
- javascript
- $("#stats").click(this.schimbastat);
- $("#real").click(this.schimbareal);
- $("#stats2").click(this.schimbastat2);
- $("#real2").click(this.schimbareal2);
- schimbastat:function(){
- $("#realtime").attr("data-show","hide");
- $("#statistics").removeAttr("data-show");
- },
- schimbareal:function(){
- $("#realtime").removeAttr("data-show");
- $("#statistics").attr("data-show","hide");
- },
- schimbastat2:function(){
- $("#realtime2").attr("data-show","hide");
- $("#statistics2").removeAttr("data-show");
- },
- schimbareal2:function(){
- $("#realtime2").removeAttr("data-show");
- $("#statistics2").attr("data-show","hide");
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement