Child Task Background color change

I’m looking to change the background color of child tasks.

To my understanding the HTML structure of dhtmlxGantt makes no differentiation between parent and child tasks. I’ve tried directly adding the CSS and adding a new class via jQuery, but changes to the DOM seem to be overwritten.

Is there a way to change the background color of child tasks?

Hello,
you can use the template functions to override css classes and html content of gantt objects.
Namely, task_class template
docs.dhtmlx.com/gantt/api__gantt … plate.html

JS:gantt.templates.task_class=function(start, end, task){ if(task.$level > 1){ return "child_task"; } return ""; };
CSS:[code].gantt_task_line.child_task{
background-color: value;
}

.gantt_task_line.child_task .gantt_task_progress{
background-color: value;
}[/code]

Perfect.

Thanks very much.