Station Deviation settings
Posted: Wed Jan 03, 2018 10:55 am
Is it possible to set the graph view as default view instead the Temp view? Thanks for reading.
Official Forum for Meteotemplate weather website template.
https://www.meteotemplate.com/forum/
Code: Select all
<span class="mticon-graph stationDeviationParameterIcon stationDeviationActive tooltip" data-id="graph" title="<?php echo lang('graph','c')?>"></span>Code: Select all
<div id="stationDeviationDivT" class="stationDeviationDiv" style="display:none">Code: Select all
<div id="stationDeviationDivGraph" style="width:98%;height:300px;margin:0 auto;"></div>Code: Select all
$(".stationDeviationParameterIcon").click(function(){
$(".stationDeviationDiv").hide();
id = $(this).attr("data-id");
$(".stationDeviationParameterIcon").removeClass("stationDeviationActive");
$(this).addClass("stationDeviationActive");
if(id=="T"){
$("#stationDeviationDivGraph").hide();
$("#stationDeviationDivT").show();
$("#stationDeviationDivR").hide();
}
else if(id=="R"){
$("#stationDeviationDivR").show();
$("#stationDeviationDivGraph").hide();
$("#stationDeviationDivT").hide();
}
else if(id=="graph"){
$("#stationDeviationDivGraph").show();
Highcharts.chart('stationDeviationDivGraph', options);
$("#stationDeviationDivT").hide();
$("#stationDeviationDivR").hide();
}
})