I have a code it looks like this. It basicly replace ''php echo'' with an image. But... When i load or reload the page i can still see ''php echo'' i want that image to be loaded direcly in 0 sec so i dont need to see ''php echo'' and also load that image in 0 sec. /// Sorry for my bad english.
Video example: https://youtu.be/XFI7DIrlVcM
<td id="X"><?php echo $row['11']; ?></td>
<script>
var tdList = document.getElementsByTagName('td');
for(var i=0; i< tdList.length; i++){
if(parseInt(tdList[i].innerHTML.trim())>= 0 && parseInt(tdList[i].innerHTML.trim())< 10 && tdList[i].getAttribute('id') == "X")
tdList[i].innerHTML = '<img src="http://i.imgur.com/bgwZcHq.png">'
}
</script>
Then remove the value from being the content of the
tdand put it on thetdas a data attribute, which you can then retrieve in JavaScript with thedatasetproperty.