fixed double active filters
This commit is contained in:
Vendored
+1
-1
@@ -715,7 +715,7 @@ header {
|
||||
font-size: 1.2em;
|
||||
line-height: 1.2; }
|
||||
header #menus nav ul li:not(.active) {
|
||||
height: 1px;
|
||||
height: 0px;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
transition: opacity 0.3s ease-in-out; }
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -83,7 +83,7 @@ header{
|
||||
font-size: 1.2em;
|
||||
line-height: 1.2;
|
||||
&:not(.active){
|
||||
height:1px; opacity:0;
|
||||
height:0px; opacity:0;
|
||||
overflow: hidden;
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
@@ -78,10 +78,21 @@ var _Filters = {
|
||||
// console.log('click filter btn', type);
|
||||
e.preventDefault();
|
||||
if(e.target.parentNode.classList.contains('active')){
|
||||
// unshow active filter
|
||||
e.target.parentNode.classList.remove('active');
|
||||
// remove the filter
|
||||
_dbs.active_type_filter = null;
|
||||
}else{
|
||||
// deactivate active filter if any
|
||||
// a.li.ul.li.active.a.click
|
||||
var prev_activelink = e.target.parentNode.parentNode.getElementsByClassName('active').item(0);//.getElementsByName('a');//.dispatchEvent('click');
|
||||
if(prev_activelink){
|
||||
prev_activelink.firstChild.click();
|
||||
}
|
||||
console.log('prev_activelink', prev_activelink);
|
||||
// show the active filter
|
||||
e.target.parentNode.classList.add('active');
|
||||
// activate the filter
|
||||
let type = e.target.getAttribute("type");
|
||||
_dbs.active_type_filter = type;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user