Show active slider when in use (not only on hover)
diff --git a/dev/js/src/menu/slider.js b/dev/js/src/menu/slider.js
index 272cbd1..af9a759 100644
--- a/dev/js/src/menu/slider.js
+++ b/dev/js/src/menu/slider.js
@@ -19,7 +19,7 @@
},
_mouseup : function (e) {
- this._slider.classList.remove('active');
+ this._element.classList.remove('active');
window.removeEventListener('mousemove', this._event.mov);
window.removeEventListener('mouseup', this._event.up);
},
@@ -34,7 +34,7 @@
this._rulerHeight = this._element.clientHeight; // offsetHeight?
this._sliderHeight = this._slider.clientHeight; // offsetHeight?
- this._slider.classList.add('active');
+ this._element.classList.add('active');
window.addEventListener('mousemove', ev.mov);
window.addEventListener('mouseup', ev.up);
diff --git a/dev/scss/header/menu.scss b/dev/scss/header/menu.scss
index d844d14..af5331f 100644
--- a/dev/scss/header/menu.scss
+++ b/dev/scss/header/menu.scss
@@ -51,7 +51,8 @@
@include choose-item;
}
-ul.menu:hover > div.ruler {
+ul.menu:hover > div.ruler,
+ul.menu > div.ruler.active {
opacity: 1;
}
@@ -81,9 +82,10 @@
cursor: pointer;
z-index: 600;
border-radius: 4px;
- &:hover, &.active {
- @include choose-hover;
- }
+ }
+
+ &.active > span {
+ @include choose-hover;
}
> div {