I have an announcement list slider (using the Hillbilly slider set up.) I've added a heading section that pulls the Title field of the announcement list. I would like to add some Javascript that will change the <h2> tag to a color chosen from a drop down column in the announcement list.

I've tried to using the formatting in SharePoint Designer to change the list itself but it seems like the title field can be formatted. Would anyone be able to help.

Basically the formula would be "if Text Color" equal 'green' set <h2> to color: green;. I just don't know how to write the formula.

  • post your code if you could by editing the post, it's surely just a minor tweak to your script Feb 9, 2017 at 20:17

1 Answer 1


Are you using SharePoint 2013, 2016 or SharePoint Online? If yes, may be Client Side Rendering (JS Link) could be an approach.

I love client side rendering its a very nice feature. Here are some examples: https://code.msdn.microsoft.com/office/Client-side-rendering-JS-2ed3538a

But it's not available in SharePoint 2010

  • If you go CSR/JSLink find anything you can by Andrei Markeev and his Cisar Chrome Extension Feb 9, 2017 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.