theonlychase
8/21/2018 - 12:16 AM

Looping an HTMLcollection

Not finished

document.getElementsByClassName("storeFront main")[0].innerHTML += '<div class="grid_container"></div>';
var elements = document.getElementsByClassName('nextCatLinks');
Array.prototype.forEach.call(elements, function(element) {
    console.log('element', element);
    document.getElementsByClassName("grid_container")[0].appendChild(element);
});