Currently, I am attempting to devise a method to target all siblings and gradually fade them out before fading in the specific element that is being targeted.
$('#MyDiv').siblings(':visible').not('h2').fadeOut('slow', function() {
$('#MyDiv').fadeIn('slow');
});
Even though the :visible
selector should work in theory, it doesn't seem to be functioning properly. The main issue arises when the complete
event triggers immediately due to some siblings already being hidden.
I believe there must be a straightforward solution for this problem, but perhaps I have been gazing at it for too long and missing a simple detail.