mirror of
https://github.com/pure-css/pure.git
synced 2024-11-24 10:44:21 +00:00
17 lines
497 B
JavaScript
17 lines
497 B
JavaScript
|
(function (window, document) {
|
||
|
|
||
|
var unitsToggle = document.querySelector('.grids-show-all'),
|
||
|
notReducedUnits = document.querySelectorAll('.grids-unit-not-reduced');
|
||
|
|
||
|
unitsToggle.onclick = function (e) {
|
||
|
[].slice.call(notReducedUnits).forEach(function (unit) {
|
||
|
if (e.target.checked) {
|
||
|
unit.removeAttribute('hidden');
|
||
|
} else {
|
||
|
unit.setAttribute('hidden');
|
||
|
}
|
||
|
});
|
||
|
};
|
||
|
|
||
|
}(this, this.document));
|