0
Personal what is wrong in the code, I made a function that calls a css if a value is greater than 5 , the higher value works but the lower that would be 3 where would appear other css does not work follows the code
SetInterval(function () {
roundedValue = Math.round( parseFloat( sensorValor ) * 100) / 100;
// roundedValue = math.round(parseFloat($('#testValue').val()( * 100 / 100;
if ((roundedValue >= 5) $$ testEnable ) {
$('#pag-1').hide();
$('#pag-2').show();
testEnable = false;
consolo.Log('teste ok!')
}
if ((roundedValue <= 3) $$ testEnable ) {
$('#pag-1').hide();
$('#pag-4').show();
testEnable = false;
consolo.Log('teste ok!')
}
there’s something wrong with the comparative?
$$
would not be&&
? Read more on logic operated– Marconi
In addition to the error observed by @Marconi, the function closing key is also missing. Put HTML code also so we can have more background to help fix the problem.
– Leandro
Your code is missing
});
at the end of the line and exchange$$
for&&
.– Matheus Miranda