I fixed it:

$("." + currentSection).next().slideDown(500);

missed the next()

I guess I need aa break!

On Sep 23, 6:27 pm, PaulC <[EMAIL PROTECTED]> wrote:
> I have a set of lists with child elements – these are my navigation.
> Each top level list item a has a class that corresponds to a given
> section.
>
> The child elements are hidden by default. I want a correct child list
> to open based on the URL you are visiting.
>
> The code I have is as follows:
>
> var currentSection = document.location.toString().split('/')[4];
>
> I then want the list item with the matching class to the var
> currentSection to slide open. I thought it was this:
> $("." + currentSection).slideDown(500);
>
> But it doesn’t work!

Reply via email to