Building on the Quick Start example, you can change the colors and styles of each element in the tree using CSS styling. For available tree CSS selectors, see the jquery.wijmo.wijtree.css file in your installation folder.
Drop down and copy styles to paste in <head> section
Style |
Copy Code |
---|---|
<style type="text/css"> /* jQuery UI hover state */ .wijmo-wijtree .ui-state-hover { background: Blue; color: White; } /* jQuery UI active state */ .wijmo-wijtree .ui-state-active { background: #009900; color: #ffffff; } /* wijtree expanded selector */ .wijmo-wijtree .wijmo-wijtree-node[aria-expanded="true"] { font-weight:800 } </style> |
Drop down and copy markup to paste in <body> section
Markup |
Copy Code |
---|---|
<div> <ul id="tree"> <li class="folder"><a><span>Folder 1</span></a> <ul> <li class="folder"><a><span>Folder 1.1</span></a> <ul> <li class="file"><a><span>File 1.1</span></a></li> <li class="file"><a><span>File 1.2</span></a></li> <li class="file"><a><span>File 1.3</span></a></li> <li class="file"><a><span>File 1.4</span></a></li> <li class="file"><a><span>File 1.5</span></a></li> </ul> </li> <li class="file"><a><span>File 1.2</span></a></li> <li class="file"><a><span>File 1.3</span></a></li> <li class="file"><a><span>File 1.4</span></a></li> <li class="file"><a><span>File 1.5</span></a></li> </ul> </li> <li class="folder"><a><span>Folder 2</span></a> <ul> <li class="file"><a><span>File 2.1</span></a></li> <li class="file"><a><span>File 2.2</span></a></li> <li class="file"><a><span>File 2.3</span></a></li> <li class="file"><a><span>File 2.4</span></a></li> <li class="file"><a><span>File 2.5</span></a></li> </ul> </li> <li class="folder"><a><span>Folder 3</span></a> <ul> <li class="file"><a><span>File 3.1</span></a></li> <li class="file"><a><span>File 3.2</span></a></li> <li class="file"><a><span>File 3.3</span></a></li> <li class="file"><a><span>File 3.4</span></a></li> <li class="file"><a><span>File 3.5</span></a></li> </ul> </li> </ul> </div> |