I would like to achieve 2 questions, the first is that I have an image inside a div, that simulates a little light, the idea is that depending on the number of records in a table I show the image and over it the number. I use a function to bring the value from a php but for some reason it erases the image and does not overlap the value.
The second is that I would like the image, which is like a light green button, to flicker or switch to a lighter color when the value obtained is greater than zero, which is convenient for me? I copy the code:
function actualizar(){
$('#sensor').fadeOut("slow").load('prueba1.php').fadeIn("slow");
}
setInterval( "actualizar()", 10000 );
#sensor {
position: absolute;
overflow: hidden;
top: 40px;
z-index: 29999;
}
#luxecita {
font-size: 20px;
font-weight: bold;
color: white;
z-index: 30000;
}
<div id="sensor"><img id="luxecita" style="width:65px; height:65px;" src="img/alerta_green.png"/></div>
Sorry for the mistakes, but I'm still learning.