id like to create an array storing:
document title
document summary
document link
and then loop through each entry, displaying each in the html.
so far ive got my array..:
var docs = [
{
doc-title: "onesider number 1",
doc-info: "its onesider number 1",
doc-src: "link here"
},
{
doc-title: "Onesider number 2",
doc-info: "its onesider number 2",
doc-src: "link here"
}
];
but after this I have no idea how to loop and display each. any suggestions?
You are asking two questions at a time:
You can check this question about loops in javascript, the each() function in jQuery, also take a look at append, prepend, text, html, attr functions in jQuery documentation.
Here is probably what you are trying to achieve (assuming you are using jQuery) :
With this base html :
you should end-up with something like :
Here is the working jsFiddle