Some questions:

What happens on the first click? Nothing, or "Hide child ul"?
What happens on the third, fourth, nth, clicks? Does any one click
always check against the preceding click, regardless of whether that
preceding click matched it's own preceding click or not?
Are you always checking nth click against (n-1)th click? Or, if you
get a match [ nth = (n-1)th ] are you clearing down your 'clicks
stack' and starting again from 'first' click?
What is 'child ul' a child of? The preceding [ (n-1)th ] clicked
element? Or does it depend on whether nth = (n-1)th?

On Nov 20, 6:22 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> Just started working with jQuery in the past few weeks, fairly
> impressed thus far. :)
>
> I've got a questions which actually might touch base more on a general
> JS question but figured might as well ask it.
>
> What I'm trying to do:
>
> // What got clicked first? (capture)
> // What was clicked Second? (capture)
> // Was the second click the same as the first?
>    // Hide child ul
>    // else
>    // Hide child ul + open new child from second parent
>
> I guess my key stumbling block is storing the last clicked element
> into memory to check agaist during the next function call.
>
> I've this so far:
> var $whatClicked = ($(this).get());
>
> Any help is greatly appreciated.
>
> Cheers,
> David

Reply via email to