Emebed jQuery update doesnt work ?
Hello,
I have a problem with jQuery in embed, i get weather like text from my web i get it like json and update it in xibo, but first time it works fine, i set every 12 hour to make a request but it dosnt work nothing updates
here is my code from embed:
html: <style type="text/css">
span.texti {
font-size: 36px;
color: #3b3b3b;
float:right;
}
</style>
<span class="texti">- Min. Temp <span id="min"></span>°C, Max. Temp <span id="max"></span>°C | <span id="date"></span> | <span id="day"></span> | <span id="time"
JS: <script src="https:/
<script type="text/
function EmbedInit() {
getValues();
showTime();
}
function getValues(){
$.getJSON("http://
function(data){
$("#
$("#
$("#
$("#
}
);
}
function showTime() {
var today = new Date();
var h=today.getHours();
var m=today.
var s=today.
// add a zero in front of numbers<10
h=checkTime(h);
m=checkTime(m);
s=checkTime(s);
var ap = "AM";
if (h > 11) {
ap = "PM";
}
if(h == 12){
getValues();
}
if(h == 00){
getValues();
}
if(h == 0){
getValues();
}
var time = h + ":" + m + " " + ap;
$("#time"
t = setTimeout(
}
function checkTime(i) {
if (i < 10) {
i = "0" + i;
}
return i;
}
</script>
Thnx
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Xibo Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Durim Jusaj for more information if necessary.