Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Change the color of Single column ?

$
0
0

Hello,

I have added one ListWebpart on webpart page and want to change the color of single column that is Status column contains data  (Approved,Rejected,Pending).But that below code is not working I added this code in CEWP.

<script type="text/javascript"
src="//ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script><script type="text/javascript">
$(document).ready(function(){
$Text = $("td.ms-cellstyle.ms-vb2:contains('Approved')");
$Text.css("color", "#0076e5");
$Text = $("td.ms-cellstyle.ms-vb2:contains('Rejected')");
$Text.css("color", "#70e120");
$Text = $("td.ms-cellstyle.ms-vb2:contains('Pending')")
$Text.css("color", "#ff0000");
});</script>

Thanks,


Viewing all articles
Browse latest Browse all 7589

Trending Articles



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