I have this jQuery code:
$(document).ready(function () {
$('a.link').click(function (e) {
e.preventDefault();
var olink = $(this).attr('href'); $('.geral_menu').animate({ bottom: "520px" }, 500, function () {
$('.geral_conteudo').fadeOut('fast', function () {
$(olink).delay(100).fadeIn('slow');
});
});
});
});
When I click on the menu divs with class geral_menu
, the bar containing these divs move up and show the content below. After navigating/clicking around on some of the headings, the content will flash twice instead of fading out and in properly.
You can see the effect in action here.
Try to use .stop() and .promise() like