Hi, I don't understand how this works. If I'm writing JS code in the head of the document, and I want to wrap a chunk of it within a CSS div, how do I do this?
I want to wrap each run of the loop (technical term?) in a separate div. So the first time it runs I want to name the output #example_id0, then #example_id1 etc, and so on.
e$("menu_Space").innerHTML = e$("menu_Space").innerHTML + "<div class='parent" + a + "'>" + e$("link_Name" + a).value + "</div>";
e$("menu_Space").innerHTML = e$("menu_Space").innerHTML + "<div class='nest" + a + "'>" + nTSplit[a][z] + "</div>";
So if my chunk of code runs 3 times, I want 3 separate divs for each output.
e$ = document.getElementById btw.
I thought I could just write in the start of the loop in document.getElementById("menu_Space").innerHTML, and close it AFTER the code in the same way, but this doesn't work. I'm just a bit confused.
Any help is greatly appreciated.