-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
32 lines (26 loc) · 959 Bytes
/
Copy pathindex.js
File metadata and controls
32 lines (26 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
;(function(window, document, undefined){
// generate html list
var daysHTML = document.getElementById('webglol'),
docFrag = document.createDocumentFragment(),
// update this number as the chronicles continue.
numberOfDoneSketches = 10;
for (var row = 1; row <= 1; row++) {
var ul = document.createElement('ul'),
tempArray = [];
for (var column = 1 * row; column <= 10 * row; column++) {
var liArray = [],
markup;
if (column <= numberOfDoneSketches) {
markup = '<li><a href="' + column + '/index.html">LOL <span>' + column + '</span></a></li>';
} else {
markup = '<li class="is-disabled"><a href="#">LOL <span>' + column + '</span></a></li>';
}
tempArray.push(markup);
liArray = tempArray.slice(-10);
ul.innerHTML = liArray.join('');
}
docFrag.appendChild(ul);
ul = null;
}
daysHTML.appendChild(docFrag);
})(window, document);