Jump to content
Search Community

Toggle sub-menu with fading/blurring parent when sub-menu is shown/toggle

Louienator test
Moderator Tag

Recommended Posts

You'll need to scope the elements to their current .each() right now when you click you get all the .sub-menu items and thus they will all play. 

 

I've modified your HTML so that .sub-menu is a child of .expand-menu and have renamed the button to be .expand-menu-toggle, so now you can target $('.sub-menu', this) and it will scope it to the current .expand-menu.

 

Then what I do is catch all subMenu timelines and on .play() of a timeline reverse() all other timelines. Hope it helps and happy tweening! 

 

https://jsfiddle.net/u34y8ofn/

Link to comment
Share on other sites

1 hour ago, Louienator said:

With regards to this concept, does this has the implementation with a desktop menu drop down? where you can opoen a dropdown and when another dropdown opens, the previous sub-menu will close automatically?

Hi,

 

I  don't understand this question actually. Isn't the latest demo doing that exactly? What behaviour are you looking for? Do you have an example so we can take a look?

 

Happy Tweening!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...