Hi I need some help with jquery; I've this HTML
<div id="1">1</div>
<div id="2">2</div>
<div id="3">3</div>
<label id="schedId"></label>
and I want to show in the label the div id where mouse is over. I tried with this:
for(var i = 1; i < 4; i++)
{
$('#' + i.toString()).bind('mouseover', function () {
$("#schedId").text(i.toString());
});
$('#' + i.toString()).bind('mouseout', function () {
$("#schedId").text("");
});
}
but I read always '4' in the label. Could you help me please? Thanks in advance.