mirror of
https://github.com/pure-css/pure.git
synced 2024-12-10 23:44:26 +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));
|