# Trouble building a nav/sub-nav with ember-modal-dialog?

**URL:** <https://discuss.emberjs.com/t/trouble-building-a-nav-sub-nav-with-ember-modal-dialog/15673>\
**Category:** Design\
**Created:** [October 17, 2018, 6:09pm UTC](https://discuss.emberjs.com/t/trouble-building-a-nav-sub-nav-with-ember-modal-dialog/15673 "2018-10-17T18:09:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jameshahn2](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jameshahn2/32/16087_2.png) [@jameshahn2](https://discuss.emberjs.com/u/jameshahn2)\
**Post date:** [October 17, 2018, 6:09pm UTC](https://discuss.emberjs.com/t/trouble-building-a-nav-sub-nav-with-ember-modal-dialog/15673/1 "2018-10-17T18:09:57Z")

</div>

Any `ember-modal-dialog` experts out there? Trying to figure out how to make these nav/subnavs work together. Have used `onMouseEnter={{action (mut showExample) "example"}} onMouseLeave={{action (mut showExample) ""}}` to get the subnavs going… which is great until you leave. Replacing with `"example"` for both `Enter/Leave` solves going away problem, but then you’re left with a sub-nav that doesn’t go away if you `onMouseLeave` to the left. And if you invoke `clickOutsideToClose=true` you have to double-click to make the subnav go away. Another compounding problem is you can’t see any hover actions or use the subnavs until you click on the subnav itself. All of this is less than ideal for obvious reasons. Any help would be greatly appreciated!

p.s. Yes, I know how to do this with hover CSS… but I’m trying to learn Ember here, so of course I have to be difficult. 😁

p.p.s. Spent a fair amount of last night trying to incorporate the jQuery here into a component.js file, but couldn’t nail-down the definitions to make it work. So, that’s one option… but I wouldn’t be surprised if there was a much easier way to do this – with `ember-modal-dialog` that’s **not** CSS.

> **[Edit fiddle - JSFiddle - Code Playground](http://jsfiddle.net/1stein/gDCCx/)**
>
> Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.

Thanks y’all!

 ![onmouseleave](https://us1.discourse-cdn.com/flex019/uploads/emberjs_public/original/3X/9/3/933ab30447161890e972c13a4070bae745188d67.gif)
