Jquery hover effect for each row in php query
<p>For starters, here is my php:</p>

<pre><code>$id2 = mysql_real_escape_string($id2);
                $getdata8 = mysql_query("SELECT * FROM musicbook WHERE identify='$identify' ORDER BY id DESC LIMIT 20");
                $numrowsgetdata = mysql_num_rows($getdata8);
                if ((mysql_num_rows($getdata8))&lt;1)
                {
                echo "&lt;i&gt;Be the first to say something?&lt;/i&gt;&lt;p/&gt;"; 
                }
                while ($row8 = mysql_fetch_assoc($getdata8))
                {
                $id8 = $row8['id'];
                $name8 = $row8['name'];
                $message8 = $row8['message'];
                $message10 = nl2br($message8);
                $date8 = $row8['date'];
                if ($name8==$username)
                {
                echo "
                &lt;div class='messagediv' style='background:#1A1A1A;'&gt;&lt;div style='padding:5px;'&gt;$message10&lt;br/&gt;
                &lt;div style='margin-top:4px; font-size:.8em; float:left;'&gt;&lt;div style='float:left;'&gt;&lt;a href='http://www.pearlsquirrel.com/$name8' style='color:white;'&gt;$name8&lt;/a&gt;&lt;font style='color:#D6D6D6'&gt; on $date8&lt;/font&gt;&lt;/div&gt;
                &lt;input type='hidden' id='wpm2' value='$id8'&gt;&lt;input type='button' id='deletelistenchat' class='deletelistenchat' style='display:none;' onclick='LinkOnClick2($id8); loadlistenchat();' value='(delete?)' /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
                ";
                }
                else
                {
                echo "
                &lt;div class='messagediv'&gt;&lt;div style='padding:5px;'&gt;$message10&lt;br/&gt;
                &lt;div style='margin-top:4px; font-size:.8em; float:left;'&gt;&lt;div style='float:left;'&gt;&lt;a href='http://www.pearlsquirrel.com/$name8' style='color:white;'&gt;$name8&lt;/a&gt;&lt;font style='color:#D6D6D6'&gt; on $date8&lt;/font&gt;&lt;/div&gt;
                &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;";
                }
                }
                if($numrowsgetdata &gt;= 20)
                {
                echo "&lt;div id='loadingcomments'&gt;&lt;img src='loading.gif' style='height:30px; width:30px;'&gt;&lt;/div&gt;";
                }
                ?&gt;
</code></pre>

<p>Here is my jquery:</p>

<pre><code>$('.messagediv').live('mouseover mouseout', function(event) {
    if (event.type == 'mouseover') {
    document.getElementById('deletelistenchat').style.display='block';
    } else {
    document.getElementById('deletelistenchat').style.display='none';
    }
    });
</code></pre>

<p>Now what I want to happen is that for each .messagediv div when you hover over it, it shows the delete button, #deletelistenchat.  However, it only works for the last row of each mysql query and I want the hover effect to work on each one as a user hover over it.  For example, if I hover over the first post by a user, the hover effect activates on the last post retrieved by the mysql query.  I have been trying to figure this out for some time now, and am lost as anything.  Help would be appreciated. </p>
