/    Sign up×
Community /Pin to ProfileBookmark

Multi-level navigation issues with JS logic

I am creating a multi-level navigation, and I’m running to some issues with the jquery logic. I have it close to how it needs to behave but not fully there.

Basically there are 4 sub-levels below the main trigger button. Clicking on the trigger button exposes sub-level 1, once an option from sub-level 1 is click, it exposes its corresponding sub-level 2, and so on and on.

The problem I am encountering is if someone is on sub-level 2 and clicks on one of the options (revealing sub-level 3) still back inside sub-level 2 they then decide to choose another option the whole architecture collapses (hides) where I just want the original sub-level 3 to hide and reveal the new corresponding sub-level 3. This is also happening in sub-levels beyond 2.

Here is a link to my codepen [url]http://codepen.io/Simetria/pen/ZQOJZz[/url]

Follow this path: Manu 1 > Model 1> Years 2 >

Anyone can think of a way to fix this logic.

Thank you in advance!

Sergio

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @Sribeiro spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...