I have a problem selecting specific checkbox and putting higlight css for its div inside the mysql_fetch_array here's my code \[code\]$count=1;$query = mysql_query('SELECT * FROM thread');while($row = mysql_fetch_array($query)){ echo "<div class='row".$count."'><input type='checkebox' class='chk_box".$count."'> ".$row['title']."</div>"; $count++; }<script> var count= "<?php echo $count?>"; for(var y=1;y<=count;y++){ $('.chk_box'+y).click(function() { if(this.checked) { $('.row'+y).addClass('backcolor'); } else{ $('.row'+y).removeClass('backcolor'); } }); }</script>\[/code\]