i cant follow your logic there.. it seems like you have a count var that is always equal to i. it never gets reset to zero. Also, it looks like you are appending a td to a tr that hasn't been created yet.
Here's another solution:
- <script language="javascript" type="text/javascript">
- $(function(){
- // append ten table rows to numbers table
- $("table.Numbers").append("<tr><tr><tr><tr><tr><tr><tr><tr><tr><tr>")
- // append ten table cells to each table row
- .children('tr').append("<td><td><td><td><td><td><td><td><td><td>")
- // append a count to each table td so that the cells are numbered one to one hundred.
- .children('td').each(function(i){
- // appending index + 1 to number from 1-100 rather than 0-99
- $(this).text(i+1);
- });
- });
- </script>
seems simple, however, I don't know which solution would run quicker.
-- Kevin
------------------------------------------------
http://www.tentonaxe.com