JSFiddle - React, Tailwind, and code Playground

by Paulpro

HTML

<div align="center" id="content-container">
                        <a href="#" id="ap">Show #alertpay</a> 
                    </div>

  <div id="alertpay" style="display:none">
    #alertpay content here.

      <a href="#" id="return-link">RETURN</a>

    </div>

JavaScript

(function(){
    var cchtml;
    $('#ap').click(function(){
       cchtml = $('#content-container').html();
       $('#content-container').html($('#alertpay').html());
       return false;
    });
console.log($('#return-link'));
    $('#return-link').click(function(){
       console.log('Test');
       $('#content-container').html(cchtml);
       return false;
    });
})();