Multiple swap divs with jquery

hi guys,
the script below swaps the divs based on the ID, however when I have up to 5 divs, how do I implement it ?

Or do I repeat the triggerButton event over and over again ?

e.g. $(‘#triggerButton’).click(function (e)
then $(‘#triggerButton1’).click(function (e)
$(‘#triggerButton2’).click(function (e)

etc ???

Here is my code

$(document).ready(function () {
    $('#triggerButton').click(function (e) {
        e.preventDefault();
        $('#div1').fadeOut('fast', function () {
            $('#div2').fadeIn('fast');
        });
    });

});

many thanks
Ehi

Could you post some HTML to go with that code.
I’m finding it quite hard to get a picture of what you’re trying to do.

thanks, I found an easy way to get it done. Adding the same class to multiple divs.
many thanks



$(document).ready(function () {
   
    $('.showSingle').click(function () {
        $('.dashboard_adverts').fadeOut();
        $('#div' + $(this).attr('target')).fadeToggle(1500);
    });

});