Hi, I have a webapp that connects to an API and pulls out a series of data.
That's right, everything works.
The problem comes when I put all the divs (or the majority) in visibility: hidden with the intention of making them visible once a specific IF is fulfilled.
Here's the problem. They become visible, but there is no data ... And it's driving me crazy.
Theory of visibility: hidden; still behaving the same, no? The data should be there!
A bit of code: (ATTENTION: In the main box, I do not put it in hidden, but I change the height from 700 to 100 and then I pass it to 700 again)
CSS
#full{
width: 450px;
height: 140px;
background-color: red;
position: absolute;
top: 100px;
left: 20px;
visibility: hidden;
JS
if(xmlhttp.readyState === 4 && xmlhttp.status === 200) {
document.getElementById("box").style.height = "700px";
document.getElementById("full").style.visibility = "visible";
document.getElementById("logobox").style.visibility = "visible";
document.getElementById("logobox img").style.visibility = "visible";
document.getElementById("infobox").style.visibility = "visible";
document.getElementById("reposBox").style.visibility = "visible";
document.getElementById("iconsBox").style.visibility = "visible";
document.getElementById("reposFull").style.visibility = "visible";
json = JSON.parse(xmlhttp.responseText);