How to add an item to the top of a dynamic list
Posted
by user181318
on Stack Overflow
See other posts from Stack Overflow
or by user181318
Published on 2010-06-13T13:01:25Z
Indexed on
2010/06/13
13:12 UTC
Read the original article
Hit count: 177
JavaScript
|html
Like the title states, does anyone out there have a clear way to implement this type of functionality?
Example: If you go to http://weewar.com, in their front page you noticed an ajax module that updates every second. However, all of the new items are added to the top of the list. My question is around that very same functionality.
Does anyone have an easy and clear idea as to how one would implement this functionality?
So far I have a method that initially creates the list, then another method is called in an interval that pulls the most recent data from the server..
However, I'm stuck with, how can I add the new dynamic node to the top of the list.
If you can guide me to where I can find this information or give me an idea as to how I can implement this I will be very happy and grateful :)
Thanks in advanced.
© Stack Overflow or respective owner