Skip to content

Instantly share code, notes, and snippets.

View intojs's full-sized avatar

Daniel Dughila intojs

View GitHub Profile
(function () {
var cells = document.querySelectorAll('.cell');
var currentLevel = 0;
var arrayCells = new Array(new Array(), new Array(), new Array(), new Array());
[].forEach.call(cells, function (item, i) {
if (i % 4 === 0 && i !== 0) {
currentLevel += 1;
}
arrayCells[currentLevel].push(item);