Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="status">
- <div id="statusHeader">
- <hr>
- <p>STATUS</p>
- </div>
- <div id="statusLeft">
- <p id="cas">Time - <b>12:30.</b></p>
- <p id="currentTemp">Current Air Temperature - <b>32°.</b></p>
- <p id="currentHum">Current Air Humidity - <b>40%.</b></p>
- <p id="currentSoilHum">Current Soil Humidity - <b>80%.</b></p>
- <p id="setTemp">Max Air Temperature - <b>30°.</b></p>
- <p id="setHum">Max Air Humidity - <b>60%.</b></p>
- <p id="setSoilHum">Min Soil Humidity - <b>50%.</b></p>
- <p id="jasSvetla">Backlight Brightness - <b>20%.</b></p>
- <p id="casCirkulacie">Circulation Period - <b>20 minutes.</b></p>
- <p id="dlzkaCirkulacie">Circulation Lenght - <b>2 minutes.</b></p>
- <p id="casVetrania">Ventilation Period - <b>1 hour.</b></p>
- <p id="dlzkaVetrania">Ventilation Lenght - <b>4 minutes.</b></p>
- <p id="casGrowLampy">GrowLamp On Time - <b>18:00 - 23:00.</b></p>
- </div>
- <div id="statusRight">
- <div id="svetloSwitch" class="switch">
- <p>Backlight</p>
- <button id="switch1" class="switchButton">
- </div>
- <div id="vetranieSwitch" class="switch">
- <p>Ventilation</p>
- <button id="switch2" class="switchButton">
- </div>
- <div id="cirkulaciaSwitch" class="switch">
- <p>Circulation</p>
- <button id="switch3" class="switchButton">
- </div>
- <div id="growLampSwitch" class="switch">
- <p>GrowLamp</p>
- <button id="switch4" class="switchButton">
- </div>
- </div>
- <script>
- var cacheData;
- var data = $('#status').html();
- var auto_refresh = setInterval(
- function ()
- {
- $.ajax({
- url: 'status.php',
- type: 'POST',
- data: data,
- dataType: 'html',
- success: function(data) {
- if (data !== cacheData){
- cacheData = data;
- $('#status').html(data);
- }
- }
- })
- }, 2000);
- </script>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement