Any idea what's wrong with my code?
var pageLimit=30;
$(document).ready(function() {
for(var i = 1; i <= pageLimit; i++) {
$('#test').append('<div id="page' + i + '" class="touch">TESTING</ div>' )
}
}
What I want is to have that function create as many divs in the body as the pageLimit value. So if someone were to go into the code and change the pageLimit to 50, it would create 50 div tags.
in the body tags, all I have is the test div. I wanted to put it into the body, without inserting it into any other divs. So I tried to replace #test with body, didn't work.
Please help! Thanks.
EDIT: Sorry, I have the ); in my original code I just forgot to copy it here!
Yeah, the
tags were before I knew how to insert code into this... lol Sorry. I have ); in my original code, it still doesn't work.