Krish
Junior Member
Posts: 2
Registered: 1/4/2008
Location: India
Member Is Offline
|
| posted on 1/4/2008 at 10:32 AM |
|
|
Tree Item Color Change
Is there a way to change the color of just the selected Menu item using JS?
|
|
|
tigra
Administrator
Posts: 1976
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 1/7/2008 at 02:10 AM |
|
|
In tree_tpl.js you can assign separate css class to the selected tree item. See product documentation for the list of the configuration key in
template file.
|
|
|
Krish
Junior Member
Posts: 2
Registered: 1/4/2008
Location: India
Member Is Offline
|
| posted on 1/8/2008 at 05:38 PM |
|
|
I went through the code and documentation. I was able to static on tree init change the text color etc. I want to change the color of the selected
item only. Any code snippet would be help full.
Thanks,
Krish
|
|
|
tigra
Administrator
Posts: 1976
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 1/9/2008 at 04:19 PM |
|
|
with the free version this you'll need to change code in line #103 of tree.js from:
get_element('i_txt' + this.o_root.n_id + '_' + this.n_id).style.fontWeight = b_deselect ? 'normal' : 'bold';
to
get_element('i_txt' + this.o_root.n_id + '_' + this.n_id).style.color = b_deselect ? 'black' : 'red';
In PRO version this can be done via the template configuration and CSS.
|
|
|