all checkbox has to be the class = "myClass"
$(".myClass").attr("checked", true);
Extended example:
<html>
<head>
<title></title>
<script type="text/javascript" src="../jquery-ui-1.7.custom/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
jQuery(function(){
alert('before')
$(".myClass").attr("checked", true);
alert('after')
});
</script>
</head>
<body>
<input type="checkbox" id="cb1" class="myClass" value="false">
<input type="checkbox" id="cb2" class="myClass" value="false">
<input type="checkbox" id="cb3" class="myClass" value="false">
<input type="checkbox" id="cb4" class="myClass" value="false">
<input type="checkbox" id="cb5" class="myClass" value="false">
<input type="checkbox" id="cb6" class="myClass" value="false">
<input type="checkbox" id="cb7" class="myClass" value="false">
<input type="checkbox" id="cb8" class="myClass" value="false">
<input type="checkbox" id="cb9" class="myClass" value="false">
<input type="checkbox" id="cb0" class="myClass" value="false">
</body>
</html>