Board Logo

Tree Item Color Change
Krish - 1/4/2008 at 10:32 AM

Is there a way to change the color of just the selected Menu item using JS?


tigra - 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 - 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 - 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.


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/