Friday, 17 January 2014

Use Tab Color Dynamically on VF page from JS.





Hi guys,

I am writing this post because recently i used it and feel must share it,

Here I am creating a VF with some colored arrow on page (Created by using CSS) and color of arrows automatically changes according to the color and style of the Custom-Tab,

This requirement is mainly needed when you are creating a detail VF page

Now magic is to use arrow color same as the Tab color of your object.

I achieved this using Javascript and CSS,

Here is the VF page code:-


Screen Shots:


Now, i just changed Tab Style and color by following these steps:-

Setup -> Create -> Tabs -> Custom_Object__c

Here is the new Tab style and color:-


arrows and highlighted section color changes automatically.


Hope it will help u guys, Happy Coding....:)

No comments:

Post a Comment