toggle class fixed for hover subnav

This commit is contained in:
lvuch 2016-02-26 16:21:49 -07:00
parent 25a7c33e11
commit 89e96b1ee2
2 changed files with 7 additions and 3 deletions

View File

@ -69,6 +69,7 @@ export default Ember.Component.extend({
let currentPathArr = this.get('currentPath').split('.');
let navPartial = '';
let isInCurrentPath = false;
let bottomRow = Ember.$('.bottom-row');
hoverableTabs.forEach((tab) => {
if (currentPathArr.contains(tab)) {
@ -79,14 +80,17 @@ export default Ember.Component.extend({
if (this.get('forcedMenu')) {
navPartial = this.get('forcedMenu');
Ember.$('.bottom-row').addClass('subactive');
bottomRow.addClass('subactive');
} else {
if (bottomRow.hasClass('subactive')) {
bottomRow.removeClass('subactive');
}
}
if (isInCurrentPath) {
this.set('subnavPartial', `tabs/${navPartial}`);
} else {
this.set('subnavPartial', null);
Ember.$('.bottom-row').toggleClass('subhover');
}
}).on('init'),

View File

@ -254,12 +254,12 @@ HEADER {
.bottom-row {
min-height: $bottomHeight;
background-color: $bottom-row;
transition: ease all .05s;
&.subactive {
background-color: $accent-two;
}
NAV {
font-size: 14px;
margin-left: 68px;