JSFiddle - React, Tailwind, and code Playground

by sushanth009

HTML

<div class="info" id="step1">
<a href="#" id="next_step_1"> ok </a>

</div>
<div class="info" id="step2">
<a href="#" id="next_step_2"> ok </a>

</div>
<div class="info" id="step3">
<a href="#" id="next_step_3"> ok </a>

</div>

JavaScript

$("body").on('click', '.info', function(){
    var $this = $(this);    
    console.log('id of div :: ' + this.id);
    $this.nextAll('.info').first().fadeIn();
    $this.fadeOut();
});