So I am making a site that shows the value of a .TXT file, this is what I got so far:
<script>
$(document).ready(function() {
$("#responsecontainer").load("info.txt");
var refreshId = setInterval(function() {
$("#responsecontainer").load('info.txt');
}, 1000);
$.ajaxSetup({ cache: false });
});
</script>
So it get's the string from info.txt and puts it inside the div resonsecontainer.
But now I want that same string to be in a value of a meter, and also a auto updater for that. The code is:
<meter id="cpumeter" value="60" min="0" max="120.47" title="GB">
<div class="meter-gauge">
<span style="width: 46.42%;"></span>
</div>
</meter>
How do I autoupdate the value="60" to the string of the info.txt?
Thanks!