i use this script to load content of some div, inside another div:
$(function() {
$('#menu a').click(function(e) {
e.preventDefault();
var h = $(this).attr('href');
$('#aqui').hmtl($(h).html()).fadeOut('slow').fadeIn('slow');
//alert(h);
});
});
But, as you can see here: http://jsfiddle.net/8rB3S/, the content is load before fadeOut()
effect.
i try this tip: https://stackoverflow.com/a/2745494/588842, but with .html()
, and this not work.... this only fadeOut
and dont fadeIn
Something like that: $('#aqui').fadeOut('slow').hmtl($(h).html, function(){$(this).fadeIn('slow');})