从php do-while循环中获取.class的id


Get id of .class from php do-while loop

do{
<div class="fine" id="<?php echo $i; ?>"><?php echo $tb_dt_01 ?></div>
}while..........
$($('.fine').attr('id')).mouseover(function() {
alert($('.fine').attr('id'));
});

我有上面的do-while php循环,结果显示与$ I增量。我想从。fine中获取id。但是现在它给我第一个值或者没有值。警报只是作为测试给出的,检查值是否正确

try

$(".fine").mouseover(function() {
  alert($(this).attr("id"));
});