Hi!
I am animating on click, and when i click the element a box fades in, but i got a problem.
Inside my div tag i fetch user info from a database, now if i try to click a member named Test i get the info from the Test user, because he's the newest user.
But, when i try to click the second user (John Smith) i get the user info from Test to display again, anywhere i click, i get the Test infomation.
My script in the head look like this:
<script> $(document).ready(function() { $("#new_user").click(function() { $(this).children("#new_users_box").animate({opacity: 'toggle' }); }); }); </script>
Then i got this where the elements are:
<td valign="top" width="70%" align="center">
<div id="new_memb_content" class="box_square">
<img src="mysite image" width="245" height="27" style="margin-left:-8px;" /><br><br>
<?php
if ($_SESSION['username'])
{
include 'db_connect.php';
$sql = "SELECT username, id, gender, user_thumb1 FROM members ORDER BY members.`id` DESC LIMIT 20";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result))
{
$thumb1 = $row['user_thumb1'];
$new_id = $row['id'];
$new_user = $row['username'];
echo '
<div id="new_user">
<a class="box_round" style="background-color:#101010 !important;">'.$new_user.'</a>
<div id="new_users_box" class="box_newest" style="display:none;">
<p>'.$new_user.'</p>
</div>
';
}
}