Using conditionals in the interface to switch between wind chill and heat index
Posted: Sun 04 Sep 2016 7:11 pm
I'm not as versed in what is being used for the MX interface, so I thought I'd ask for assistance here.
The stock interface in CMX comes with just Wind Chill on the index page. I'd like to try and figure out how to modify it so that the Wind Chill block will display when it's less than 80 degrees outside, and when it's more than 80 degrees, I'd like for it to switch to heat index.
I modified the index.html page already to display the heat index as this:
..but I'd like to be able to write it with an if/else statement to show one block if the condition is met, else show the other block.
Has anyone tried this yet?
Thanks.
The stock interface in CMX comes with just Wind Chill on the index page. I'd like to try and figure out how to modify it so that the Wind Chill block will display when it's less than 80 degrees outside, and when it's more than 80 degrees, I'd like for it to switch to heat index.
I modified the index.html page already to display the heat index as this:
Code: Select all
<!-- Heat Index Block -->
<div class="col-sm-6 col-lg-3">
<div class="dash-unit">
<span class="dtitle">Heat Index</span>
<hr>
<div class="cont">
<div class="cont" >
<span id="HeatIndex" style="font-size:400%">--.-</span> <span class="TempUnit" style="vertical-align:150%">°C</span>
</div>
<div class="cont" >
<p><span>High </span><span id="HighHeatIndexToday" class="high">--.-</span><br><span id="HighHeatIndexTodayTime">--:--</span></p></div>
</div>
</div>
</div>Has anyone tried this yet?
Thanks.