how to animate jquery load()

Ali Demirci picture Ali Demirci · Dec 13, 2011 · Viewed 19.9k times · Source

hello im using this code to load content from another php file.

$(document).ready(function(){
           setInterval(function(){
                               $('.live-stream ul').each(function(){
                                    $(this).load('tx.php');
                        });
                }, 1000);

        });  

this works correctly but i want script to fadeIn each "li" when a new record added, anyone?

the thing i want to do is something like facebook's live user action feed that on the right top of facebook home

Answer

Andri picture Andri · Jan 22, 2013

You have to hide it first.

$(this).hide().load("tx.php").fadeIn('500');