Conditions | 1 |
Paths | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | var targets = Object.keys(document.querySelectorAll('[data-vanillatrigger]')).map(function(index) { |
||
5 | targets.filter(function(item) { |
||
6 | item.addEventListener('click', function() { |
||
7 | if(typeof item.value === 'undefined' || item.value === "") { |
||
8 | targets.filter(function(item) { |
||
9 | item.checked = false; |
||
10 | return item.classList.remove('is-active'); |
||
11 | }) |
||
|
|||
12 | } else { |
||
13 | return item.classList.toggle('is-active'); |
||
14 | } |
||
15 | }); |
||
16 | }); |
||
17 |