I wish to create divs, contents of the div, put those each in an tag, and then assign links the to the with JavaScript.
I apologize in advance for the inception of my situation.
This is what the interior of the sidebar looks like right now:
<div id="sidebar">
<a href="link.a"><div>item a</div></a>
<a href="link.b"><div>item b</div></a>
<a href="link.c"><div>item c</div></a>
</div>
I want to create the inside the "sidebar" div using two arrays:
var linkList = ["link.a", "link.b", "link.c"];
var titleList = ["item a", "item b", "item c"];
I want the final html code to look like this:
<div id="sidebar" onload="createLinks()">
</div>
Unfortunately, I don't know how to code the JavaScript to make this work. If someone could help me, that'd be great!