I'm trying to implement a Jquery code in order to change background-color and data is a specific text = "Habilitados". I cant make it work. What's wrong with my code?
var item ;
$(document).on('knack-view-render.view_292', function (event, scene) {
    var data = Knack.models['view_292'].data.models;
    for (x = 0; x < data.length; x++) {
        item = data[x].attributes;
        if(item.field_1062=="Habilitados") {
            $("#"+item.id).css("background-color", "red");
        }
    }
});
 
     
    