How to add an item to the top of a dynamic list
- by user181318
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.