I am using JavaScript and jQuery to create a simple 40x40 grid.
Here\'s my nested for loop to do this:
function display_grid() {
browser_grid = \'\'
Thanks for the help guys!
Changed the variable for my inner loop fixed the problem, but there was a problem with using .append()
Apparently it doesn't support partial markup, so instead I just appended all of my divs to a string instead.
for(var i=0;i<40;i++){
browser_grid+='';
for(var x=0;x<40;x++){
browser_grid+=" ";
}
browser_grid+='';
}
$visible_grid.append(browser_grid)
After which, I appended the string to $visible_grid
This seemed to do what I wanted it to do. Just wanted to point it out for anyone else using the append method for this purpose.