In my domotica script i work with an API for "buienradar" It will load in the page but will not refresh every "x" time. So the API will stay on the loop that is build on the first load in the page.
How can i change my script that the API refresh every hour with new information from the internet / API?
BR, Jeroen
<div class="col col-md-3 col-sm-6 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Buienradar</h3>
</div><!-- /.box-header -->
<div class="medium-box-body">
<img id="radarupdate">
</img>
</div>
</div>
</div>
<script>
$(function() { Domotica.dashboard.init(); });
$(document).ready(function() {
$('#radarupdate').attr("src","http://api.buienradar.nl/image/1.0/RadarMapNL?w=256&h=256");
setInterval(function(){
$('#radarupdate').attr("src","http://api.buienradar.nl/image/1.0/RadarMapNL?w=256&h=256");
var html = '<img border="0" src="http://api.buienradar.nl/image/1.0/RadarMapNL?w=256&h=256">';
},900000);
});
</script>