/    Sign up×
Community /Pin to ProfileBookmark

Animate new table rows

Hi all, I’ve got a table in a while loop saved as table.php

[code=php]
<?php do { ?>
<table width=”176″ border=”1″>
<tr>
<td width=”166″><label for=”textfield”></label>
<input name=”textfield” type=”text” id=”textfield” value=”<?php echo $row_Recordset1[‘comment’]; ?>”></td>
</tr>
</table>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
[/code]

In my main index.php, I call the table into <div id=”table”> using jquery, and update the table data every second

[code=html]
<script type=”text/javascript”>
$(document).ready(function(){
refreshTable();
});

function refreshTable(){
$(‘#table’).load(‘table.php’);
setTimeout(refreshTable, 1000);
}
</script>
[/code]

I need to get the new table rows to animate down rather than just appear, if there is new data when it refreshes. Can anyone help me do this and do I need the while loop in a DIV rather than table? Thanks ?

to post a comment
JavaScript

1 Comments(s)

×

Success!

Help @drennan spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...