Hello,

I've looked at a couple of tutorials focused on having some sort of
clickable elements that emulate tabs - hiding all but the div
associated with that element. Both of those tutorials focus on adding
IDs to the elements involved and a handler for each. This is rough on
a web app that is developing these data on the fly, so I'm looking for
a more generic solution.

I've two ideas, one I'm not sure is possible and the other feels like
cheating (the "this might break in some browsers" kind of cheating).

1) Is there a way to use the "this" object in more complicated
selectors? For example, using '>' to find children of "this" element.
I was trying to find something in the docs that spoke specifically to
the behavior of "this," but it is a hard term to search for. My guess
at the syntax certainly did not work.

2) Will it break things to add a class to the current element, then
select off of that class? For example:

- Add a 'this guy is selected' class to the clicked tab element
- Hide all the tabs not associated with that class
- Show the tab associated with that class
- Remove the class

Or, am I barking up the wrong tree(s) entirely? I'd appreciate any
push in the right direction.

Thanks!

Reply via email to