I've created a VF page, in which I'm displaying a dynamic Checkbox. Now i want when i check the checkbox, the background color should be change and when uncheck the checkbox, background color should be normal as original.
How to apply Css to dynamic checkbox. How to get ID in this condition.
My apex page code is
<td style="display: inline-table">
<div id="Territory" style="">Territory: <br/>
<apex:selectcheckboxes layout="pagedirection" value="{!Territory}" onchange="PutValue(this.id,this.value);" style="">
<apex:selectoptions value="{!TerritoryValues}" />
</apex:selectcheckboxes>
</div>
</td>
Please suggest.