I'm trying to select data out of jQuery and input it into if statement:
setInterval(function()
{
$.getJSON("IOCounter.html", function(data)
{
$('#statusInt_1').text(data.statusInt_1);
});
},
1000); //Refreshrate in ms
});
if (data.statusInt_1==1)
{
$('#Loading').toggleClass('standby');
}
})
My if doesnt select "data.statusInt_1". What am I missing?