i have some simple jquery code which im using to create this page dynamically instead of manually. here is my code
loop
for ( var i = 0; i < links.length; i++ ) {
$("#programs").append(
$("li")
.html("div")
.html("a", {
href: links[i] + ".exe"
})
.html("img", {
src: icons[i]
})
.html("p")
.html(captions[i])
);
}
declarations of arrays
var links = ["pictureVeiwer","maze","firefoxPrank"];
var icons = ["firefox-icon.gif","maze.jpg","imageVeiwer.jpg"];
var captions = ["Cute Firfox prank","Cool maze","Program to veiw pictures... kinda useless in 2013"];
I assume my syntax is a bit off, I have used similar code before but not in a loop. What am I doing wrong and how should I do this?