I have code that refreshes a div every second, but for some reason the fadeIn only works the first time. Any Ideas? <script type="text/JavaScript"> var refreshId = setInterval(function(){ $("#quote p").load("script.php").fadeIn("slow"); },1000); </script> Code (markup): I would also like this div to be added to and not replaced. Thanks -Shane
Figured it out, but the effect still only runs the first time. <script type="text/JavaScript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script> <script type="text/JavaScript"> var runs = 0; function doSomethingWithData(data) { if (runs < 10) { $("#quote p").prepend(data); runs++; } else { $("#quote p").load('script.php').fadeIn("slow"); runs = 0; } } window.setInterval(function() { $("#quote p").slideDown("slow"); $.get('script.php', doSomethingWithData); }, 1000); </script> Code (markup):