JSFiddle - React, Tailwind, and code Playground

HTML

<div id="box1" class="choice" style="background:blue;">
    <div class="selection ordinateur">
        <div class="choix1"><a class="link1" href="#"></a></div>
    </div>
</div>

<div id="box2" class="choice" style="display:none;background:red;">
    <div class="selection ordinateur">
        <div class="choix1"><a class="link2" href="#"></a></div>
    </div>
</div>


<div id="box3" class="choice" style="display:none;background:green;">
    <div class="selection ordinateur">
        <div class="choix1"><a href="#"></a></div>
    </div>
</div>

CSS

.choice{
    display:block;
    width:668px;
    height:355px;
    position:relative;
    top:100px;
}

.selection .choix1 a{
    width:328px;
    height:204px;
    display:block;
    float:left;
    margin-left: 5px;

}

JavaScript

$(".link1").click(function() {
    $('#box1').fadeOut("slow", function(){
        $('#box2').css("display","block");
        $('#box2').replaceWith(div);
       
       $('#box1').fadeIn("slow");
    }); 
    $('.link1').fadeOut("slow");
    return false;
});


$(".link2").click(function() {
    $('#box2').fadeOut("slow", function(){
        $('#box3').css("display","block");
        $('#box3').replaceWith(div);
       
       $('#box2').fadeIn("slow");
    }); 
    $('.link2').fadeOut("slow");
    return false;
});