Permalink
1 comment
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@@ -1 +1,65 @@ | ||
var getLists = document.getElementsByTagName('ul'); | ||
var getListsNum = document.getElementsByTagName('ul').length; | ||
var x = getListsNum; | ||
|
||
//var getListChilds = getLists.childNodes; | ||
|
||
var showListNumber = document.getElementById("info"); | ||
var showListNumber2 = document.getElementById("info2"); | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
function displayInfo(){ | ||
showListNumber.innerHTML = "There are " + getListsNum +" tag lists on this page."; | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
function createArr(){ | ||
|
||
var tagGenres = []; //Create parent array to contain other arrays | ||
|
||
var fetchList; | ||
|
||
for(i = 0; i < x; i++){ | ||
|
||
//tagGenres[i] = []; | ||
alert(i); //Should detect 5 UL tags | ||
fetchList = getLists.item([i]); | ||
//var getChildren = fetchList.childNodes; | ||
showListNumber2.innerHTML = getChildren[i]; | ||
|
||
//if(fetchList.hasChildNodes === true) | ||
} | ||
|
||
return tagGenres; | ||
|
||
} | ||
|
||
//function accessArr(tagGenres){ | ||
|
||
|
||
//} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
function runAll(){ | ||
displayInfo(); | ||
createArr(); | ||
accessArr(); | ||
} | ||
|
||
window.onload = runAll; |
This comment has been minimized.
ec2f378
Best commit message 2k18 by far