22 |
22 |
23 |
23 |
24 $(document).ready(function () { |
24 $(document).ready(function () { |
25 setInterval(function(){ |
25 setInterval(function(){ |
26 $.getJSON("getroom.php", function(data) { |
26 $.getJSON("getroom.php", function(data) { |
27 $("#room_temp").html(data.temperature); |
27 $("#room_temp").html(data.temperature + ' °C'); |
28 $("#room_hum").html(data.humidity); |
28 $("#room_hum").html(data.humidity + ' %'); |
29 }); |
29 }); |
30 }, 60000); |
30 }, 60000); |
31 // Create jqxTabs. |
31 // Create jqxTabs. |
32 var index = $.jqx.cookie.cookie("jqxTabs_jqxWidget"); |
32 var index = $.jqx.cookie.cookie("jqxTabs_jqxWidget"); |
33 if (undefined == index) index = 0; |
33 if (undefined == index) index = 0; |