How about:
jQuery(document).ready(function() {
var refreshId = setInterval(function() {
jQuery('ul#bla').fadeOut("fast", function () {
jQuery(this).load("testpage.php ul#bla", function () {
jQuery(this).fadeIn("fast");
});
});
}, 2000);
});
fadeIn()
, fadeOut()
and load()
are sync in jQuery so you need to place them in callback of each other.