I have this function:
function update_page(html){
$('#pagg').html(html);
}
$(function(){
$('#pagg > a').live('click', function(event){
event.preventDefault();
var link = $(this).attr('href');
$('.news').fadeOut(2000, function(){
$.ajax({
url: link,
type: 'get',
success: function(html){
update_page(html).fadeIn(2000);
}
});
});
return false;
});
});
fadeOut is working, but fadeIn is not working. What seems to be the problem?
Rewritten using delegate: