I m trying to change table cell colour on exact time. I added cell id and i can change that cell bacground colour on time between 5-6 or on every other time. But i want to change color on 5 and 15 for example. On if variable i added minutes after hours but then javascript dont understand that they are together. In this situation color chanes exactly on 5 and on every hour who have less then 15 minutes.
[code]
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var psj=0;
//ujutro od 5-6
if (hours = 5 && minutes < 15){
var i=document.getElementById(“2”);
var colori=[‘#008000′,’#ff0000’];
var nextColori=0;
setInterval(“i.style.backgroundColor=colori[nextColori++%colori.length];”+
“f.style.backgroundColor=colori1[nextColori1++%colori1.length];”,500);
}