I have returned with yet another question.
If I want to collapse all the other menu items before expanding the
clicked one I tried using this:
...
.bind('showme', function() {
$("a.Category").trigger("showme");
$(this).data("hidden", false).parent("li")
.css({background: "#00ff00"}).children("ul")
Thank you very much, that worked like a charm.
On Oct 13, 11:15 pm, Dave Methvin <[EMAIL PROTECTED]> wrote:
> How about this? It creates a couple of custom events (showme and
> hideme) that you trigger to set the state, and the click event just
> delegates to the right one based on the current st
How about this? It creates a couple of custom events (showme and
hideme) that you trigger to set the state, and the click event just
delegates to the right one based on the current state. I just
triggered a click on CollapseAll to set the initial state; if you
didn't want the coloring to be there
The markup will be generated from a MySQL database using PHP so it
could look in many different ways.
But as I have it now:
[+expand] | [-collapse]
category 1
category 1 1
f
There is a lot of similar-looking code there. You could use .toggle()
but the added complication of OpenAll/CloseAll makes that tough. What
does your markup look like?
5 matches
Mail list logo