Yes, I agree, my main problem is figuring out how to avoid rewriting the css files. I will look at that link and the active class, that sounds like it's a good way to go. Thanks!!
On Jan 8, 9:40 am, "Ariel Mauricio Nunez Gomez" <[email protected]> wrote: > Since I think you are not (yet) using AJAX, all the logic you need should be > available to the template already. > Your main issue sems to be not having to rewrite any css files but only > change the html item 'class' attribute. The last link and code snippet on my > previous mail address that issue(Using an 'active' class on the selected > item, you can dynamically set it on your template). > > Take some time to play with it and let us know how it goes. > > Frameworks like jquery can also create and change css styles on the fly, > like I said I see it as an overkill for such a simple task, but it is your > bikeshed and you get to paint it any color you may want :) > > Ariel. > > > > On Thu, Jan 8, 2009 at 12:30 PM, Margie <[email protected]> wrote: > > > I think the issue I have is that I seem to need to maintain "state". > > Let me use a contrived example. > > > Suppose I have three tabs: books-tab, music-tab, and video-tab. When > > I click on books-tab, I get a subnav bar with three subnav tabs: > > "books about animals", "books about video", "books about places". And > > similarly, when I click on music-tab I get 3 different subnav tabs: > > music-1, music-2, music-3. When I click on books-tab, I want books- > > tab to darken. When I then clock on "books about video", I want books- > > tab to stay dark and books about video" to also darken. It seems > > that when I use css, when I go to the "books about video" html page, I > > must "remember" to set a special id that makes books-tab darken. It > > seems that the html for "books about video" has to know it is being > > called on behalf of the books tab, which seems inflexible. For > > example, say I wanted to create a "books about video" under video-tab, > > the html for "books about video" needs to now set a different id in > > order to darken the video tab instead of the books tab. Basically, > > the html for "books about video" needs to know which tab it is being > > invoked by - this seems bad. > > > I haven't had a chance to look at your links below in any detail, but > > do you think they address this? Does javascript or jquery or yui > > address this issue in a way that is significantly different from css? > > I know I have to start looking into those tools so I at least > > understand what they provide. > > > And secondly, what about creating dynamic tabs? Ie, if the usr is > > going to click on something that ends up creating a new tab, how can > > css address this at all? I mean, in the css one needs to up front > > have knowledge of the ids that cause the tabs to darken. If each tab > > has its own id and you are creating them dynamically, it seems like > > the static nature of css just can't deal with this. > > > On Jan 8, 8:29 am, "Ariel Mauricio Nunez Gomez" > > <[email protected]> wrote: > > > Margie, I agree the current metod for adding new tabs in Pinax is kind of > > > cumbersome. > > > > I also think ther is no need for javascript for that kind of simle stuff > > > (i.e. This would be an overkillhttp:// > > blog.evaria.com/wp-content/themes/blogvaria/jquery/index-multi...) > > > Perhaps you may want to search for more 'css menu' examples, I think you > > can > > > getaway with just using two classes 'selected' and 'normal' > > > > Like this guys do: > >http://www.3point7designs.com/blog/2007/12/22/advanced-css-menu-trick... > > > > > <ul id="main_nav"> > > > > <li><a href="../index.html" accesskey="3" id="home" class="active" > > > > title="Home Page">Home Page</a></li> > > > > <li><a href="../about-us.html" accesskey="4" id="about" title="About > > 3.7 > > > > Designs">About Us</a></li> > > > > <li><a href="../web-design.html" accesskey="5" id="webdesign" > > title="Web > > > > Design and Development">Web Design</a></li> > > > > <li><a href="../graphic-design.html" accesskey="6" title="Graphic > > Design > > > > and Marketing" id="graphicdesign">Graphic Designs</a></li> > > > > <li><a href="michigan-seo.html" accesskey="7" title="Search Engine > > > > Optimization and Marketing" class="active" id="seo">Search Engine > > > > Optimization SEO</a></li> > > > > <li><a href="../ann-arbor-marketing.html" accesskey="8" id="contact" > > > > title="Contact Us">Contact Us</a></li> > > > > </ul> <!-- end main_nav --> > > > > Ariel.- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

