How to make it like on http://weibo.com

To new items appear on top. And the area was bounded vertically and horizontally.

    1 answer 1

    In general, the proposed site is not accordion, but simply new messages are added to the top of the list. I think you should be helped by the standard jQuery function prepend () which adds to the beginning of the collection of elements, and in the place with it the last element needs to be deleted.

    • There messages are spinning in a circle. Whether it is cached, or just a sample, it doesn't matter. But they are not directly out of the database one by one. - Tchort
    • Well, even if so, pull one message from the base, then prepend - add it to the beginning (using animate ()) and remove the last $("element :last").remove(); - DemoS
    • Well, if you can’t do it yourself, then first think carefully - if you need it at all - DemoS