https://i.sstatic.net/Ab5S9.png
Looking for assistance with a basic jQuery script that can search for a specific text string. If the text is found, I want to change the CSS of the containing div.
The HTML+CSS+JS code would be like:
$(".ng-cell .ngCellText ng-scope col8 colt8 a:contains('Assigned')").each(function(i , v){
$(this).closest(".ng-cell").css("background-color" , "green");
});
.ng1582937649646 .colt8 {
width: 140px;
}
.ng1582937649646 .col8 {
width: 140px;
left: 1175px;
height: 40px;
}
.ngCellText, .ngCenteredCellText {
padding: 0 5px 0 10px;
line-height: 40px;
font-size: 14px;
font-family: OpenSansLight,OpenSans,Helvetica;
text-transform: none;
}
.ngCellText, .ngCenteredCellText, .ngHeaderText {
padding-left: 10px;
line-height: 35px;
font-size: 14px;
}
.ngCellText {
padding: 5px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
white-space: nowrap;
-ms-text-overflow: ellipsis;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
overflow: hidden;
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div ng-style="{ 'cursor': row.cursor }" ng-repeat="col in renderedColumns" ng-class="col.colIndex()" class="ngCell col8 colt8" style="cursor: pointer;">
<div class="ngVerticalBar ngVerticalBarVisible" ng-style="{height: rowHeight}" ng-class="{ ngVerticalBarVisible: !$last }" style="height: 40px;"> </div>
<div ng-cell=""><div class="ngCellText ng-scope col8 colt8" ng-class="col.colIndex()"><span ng-cell-text="" class="ng-binding">Assigned</span></div></div>
</div>
<div ng-style="{ 'cursor': row.cursor }" ng-repeat="col in renderedColumns" ng-class="col.colIndex()" class="ngCell col8 colt8" style="cursor: pointer;">
<div class="ngVerticalBar ngVerticalBarVisible" ng-style="{height: rowHeight}" ng-class="{ ngVerticalBarVisible: !$last }" style="height: 40px;"> </div>
<div ng-cell=""><div class="ngCellText ng-scope col8 colt8" ng-class="col.colIndex()"><span ng-cell-text="" class="ng-binding">In Progress</span></div></div>
</div>
<div ng-style="{ 'cursor': row.cursor }" ng-repeat="col in renderedColumns" ng-class="col.colIndex()" class="ngCell col8 colt8" style="cursor: pointer;">
<div class="ngVerticalBar ngVerticalBarVisible" ng-style="{height: rowHeight}" ng-class="{ ngVerticalBarVisible: !$last }" style="height: 40px;"> </div>
<div ng-cell=""><div class="ngCellText ng-scope col8 colt8" ng-class="col.colIndex()"><span ng-cell-text="" class="ng-binding">Assigned</span></div></div>
</div>
Why is the background color of the Assigned div not changing to green? Can someone point me in the right direction?