JSFiddle - React, Tailwind, and code Playground

HTML

<a class="show_hide_window" > I am already there</a>
<div class = "next_tg" > </div>

JavaScript

$(function(){
    
    $('body').on('click', '.show_hide_window', function() {
        showDialog();
})
    
   $('.next_tg').html('<a class="show_hide_window" href=""> Dialog Created By Jquery </a>');
    
    
    
});



function showDialog()
{   
  alert("hi");
    /*$("#loader_ajax").dialog({ modal: true, height: 400,width:650,title: title });    
    */
  return false;           
}