RadTreeView: Add class to node containter
I need to add a class to a node's container - the <li> tag that contains the node content. I see that I can add classes with the following properties:
- CssClass
- ContentCssClass
- SelectedCssClass
But I can't find any way to add a class to the <li> tag that contains the node. I want it to look like this:
<li class="rtLI first MY-CSS-CLASS-GOES-HERE"> <div class="rtTop rtSelected"> <span class="rtSp"></span><a class="rtIn" href="campaign">Campaign</a> </div> <ul class="rtUL"></ul></li>Hello Craig,
If you want to appy styles to all of the li items you can just use the following selector:
.RadTreeView .rtUL .rtLI
If you need this selector for different purposes than styling you can apply it with jQuery
$(document).ready(function()$(".RadTreeView .rtUL .rtLI").addClass("YourClassName");)
If you want to apply a class to specific item you can also do it on document.ready:
$(document).ready(function()$(".RadTreeView .rtUL .rtLI").eq(3).addClass("YourClassName");)