do{
<div class="fine" id="<?php echo $i; ?>"><?php echo $tb_dt_01 ?></div>
}while..........
$($('.fine').attr('id')).mouseover(function() {
alert($('.fine').attr('id'));
});
I have the above do-while php loop, the results are displayed with $i incremental. I want to get the id from .fine. But currently it gives me the first value or no value. The alert is just given as a test, to check if the values are given co开发者_如何转开发rrectly
try
$(".fine").mouseover(function() {
alert($(this).attr("id"));
});
精彩评论