(function () {
    let fragment = document.createDocumentFragment();
 
    for (let i=0;i<yp_num.length;i++) {
        let li = document.createElement('li');
            let divWrap = document.createElement('div');
            let a = document.createElement('a');
            let div = document.createElement('div');
            let p = document.createElement("p");
            divWrap.classList.add('case');
            a.classList.add('link-a');
            a.href = `Model.html?m=${yp_num[i]}&v=1`;
            div.classList.add('card-img');
            div.style = `background-image: url(images/${yp_num[i]}.jpg)`;
            let key = yp_num[i];
            p.innerHTML = modelInfos[key].name;
            a.appendChild(div);           
            divWrap.appendChild(a);
            li.appendChild(divWrap);
            li.appendChild(p);
            fragment.appendChild(li);
    }
    let ul = document.querySelector('.con');
    ul.appendChild(fragment);
    
})()