Reputation: 37
how can I append the data to the top row of my table. Here is my code:
$(data).appendTo('#feeds:last');
How can I append data to the top row of my table?
Upvotes: 1
Views: 78
Reputation: 3706
If you want to add an element to the top of a table you can use prepend()
:
$('#feeds').prepend(data);
Example here: http://jsfiddle.net/KZ7qc/
jQuery docs: http://api.jquery.com/prepend/
If I have misunderstood your question and you really want it to be the last row, then you can just change the above code to append()
Upvotes: 1