Hi guys I have an array that I'm trying to append to the DOM! Here is the code:
function inputFeedContent(data){
for(var k=0; k < columns; k++) {
var col = "<div class='col-1'>";
for(var j=0; j < data.sample[k].length; j++) {
col += "<p>"+data.sample[k][j]+"</p>";
}
col += "</div>";
$('.sliding-window').append(col);
}
}
where columns = 12.
Problem is I only get five of these:
<div class="col-1">
<p>Some text</p>
</div>
What am I doing wrong here? Keep in mind I'm a noob :)
Thanks!
columnslooks like it could be a magic number? How doescolumnsget assigned 12?