i need a 10*10 table of divs so i'm trying to do it with jquery/php ... Could you help me or suggest a better way to do it?
<html>
<head>
<title>Jquery</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="#container">
<?php
for ($i=0; $i < 100; $i++) {
echo "<div class=\"box\"></div>";
}
?>
</div>
</body>
</html>
<script>
$(".box").each(function(i) {
$(this).css({
"margin-left" : String(15*(i%10)),
"margin-top" : String(15*(i\10))
})
});
alert($(".box").size());
</script>