Quantcast
Channel: SharePointCommunity
Viewing all articles
Browse latest Browse all 6649

Hintergrund von bestimmten Zeilen einfärben JavaScript

$
0
0

Hallo,

ich habe ein JavaScript Code, der eine Spalte nach dem Begriff "CR-Status" durchsuchen soll und dann anhand bestimmter Statuskriterien den Hintergrund einfärben soll.

Dies funktioniert allerdings noch nicht richtig. Ich hoffe Ihr könnt mir helfen.

$(document).ready(function(){

if(div.ms-vh-div.contains("CR Status")){
 $("td").filter(function() {
     
     return $(this).text() == 'Evaluated';
})
.css("background-color", "FF0000");

         $("td.ms-vb2").filter(function() {
     
     return $(this).text() == 'Approved';
})
.css("background-color", "00FF00");


 $("td").filter(function() {
     
     
     return $(this).text() == 'Ready to test';
})
.css("background-color", "D4D4D4");
       
    });
}

Viele Grüße

Matthias

 


Viewing all articles
Browse latest Browse all 6649


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>