JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://vast-eng.github.io/jquery-popup-overlay/jquery.popupoverlay.js"></script>
Bonjour<br/>
<a class="Modal_Open">Use this text as modal heading 1</a><br/>
<a class="Modal_Open">Use this text as modal heading 2</a>

<div id="Modal" style="display:none">
    <p>Want to switch the text here</p>
    <input type="text" />
</div>

JavaScript

$(document).ready(function() {
        $('.Modal_Open').click(function () {
            var _title = $(this).text();
            $('#Modal').popup({
                'autoopen': true,
                'onopen': function () {
                    console.log(_title);
                    $('#Modal > p').text(_title);
                }
            });
        });
});