I create eight divs in a for loop, and I want to add links each div to a different html page. And I also name the html page from 0~7. So how can I make the variable "i" into the href? Thanks!
for(i = 0; i < 8; i++) {
counter[i] = increase * (i * 2);
var div = $('<div class="node"><a id="link" href=i + ".html"><img src=archive/' + i + '.jpg width="200" height="200"/></a></div>');
div.css({'top':yoffset,'left':innerWidth/8 * i});
$('body').append(div);
objects[i] = div;
}