Why not disable / enable buttons?
$('#b > button').click(function(){ $('#div1').fadeOut(400, function() { $(this).prop('disabled', true); $('#div2 > button').prop('disabled', false); }); }); $('#div2 > button').click(function(){ $('#div1').fadeIn(400, function() { $(this).prop('disabled', true); $('#b > button').prop('disabled', false); }); });
source share