Re: will work for art: Unobtrusive Expand and Collapse Navigation : Digital Artistry by Bradley Cooper : Marlton, New Jersey - http://willworkforart.net/tutoria...
"Good questions. They are actually one in the same. You wouldn't need to set a class name on the clicking because, of course, the user would be leaving the page. So really what you want to do (I haven't written the script that would do it but I have been planning to) is to actually hard-code in a ".selected" class on that page's navigation item (or whichever way you'd do it with a cms...). The 'photography' page's navigation would just be coded as: <li class=".selected">Photography</li> (no tag needed since it's not linking anywhere) Since the javascript cycles through the list and hides everything at the sub level you'd need to make an exception for the ".selected" item. There are definitely a couple ways the write it. I would, at the end of the hiding cycle, go back through, find the '.selected', unhide it and all it's parent elements. Or you could hard code the parent levels, also with a selected class and unhide them with the javascript. (easier from JS approach, maybe less easy..."
- WillWorkforArt