On Tue, Sep 4, 2012 at 6:09 PM, darkangel <[email protected]> wrote:
> thanks for your answer but I dont get it

You would put that code inside the jquery ready() block. ie:

$(function()
{
    // here
});

The code runs through each link inside your menu, comparing the href
value of the link against the page location. When it finds a match it
removes the "close" class on the parent UL (which is set by default)
and breaks from the loop.

> I was thinking about to write a
> parameter with Session->write to read it beforeRender and fill my view
> depending on that parameter.
>
> Is there a way to have that functionality just with Js?

You could set a cookie from js and then also read it to find which UL
to remove the class from. But it's overkill. The code I provided is
much simpler.

But this doesn't have anything to do with Cake, in any case.

-- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.


Reply via email to