WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 XTree - Change class based on whether element is a folder, Joshua Hoover, January 12, 2004
     Re:XTree - Change class based on whether element is a folder, Erik Arvidsson, January 13, 2004
         Re:XTree - Change class based on whether element is a folder, Joshua Hoover, January 13, 2004

Subject: XTree - Change class based on whether element is a folder From: Joshua Hoover Date: January 12, 2004
I'm trying to come up with a way to change the class attribute of the href tag based on whether an item is a folder or not. I've figured out how to do this to the point where when the tree loads, all folders are a different class than everything else. But, when I click on a folder to expand it and then click it again to close it up, the class appears to go back to default, which is not what I want. I want to be able to set something like this for a folder element and have it stay that way regardless of what state the folder is in (closed or expanded):

<a href="http://www.website.com/" class="folderClass">Folder</a>

All other elements would be something like this:

<a href="http://www.website.com/" class="regular">Item</a>

Any ideas on how I can achieve this?



Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX