I have the following code:
function formataPorcentuaisMensais(){
var cancelamento = $("#cancelamentoMes").text().replace('%','');
var aproveitamento = $("#aproveitamentoMes").text().replace('%','');
var primCompras = $("#primComprasMes").text().replace('%','');
var juros = $("#jurosMes").text().replace('%','');
var seguros = $("#segurosMes").text().replace('%','');
if(cancelamento >= 4 && cancelamento <= 6){
cancelamento.css({'background-color': 'yellow', 'color': 'black'});
}
}
$(function(){
formataPorcentuaisMensais();
});
It seems to be correct but says that the function cancelamento.css
is not a function, does anyone know what it can be?
* I have loaded jquery; ** All variables are working.
Thank you!