JSFiddle - React, Tailwind, and code Playground

by Sam Singer

HTML

<script type="text/javascript">
    function ToggleTable() {
        var link = document.getElementById("togglelink");
        link.innerHTML = "<P style='TEXT-ALIGN: center'>Hide Inactive EDB Appointments</p>";
    }
</script>

<a id='togglelink' name='togglelink' href='#' title='Show Inactive EDB Appointments' onclick="ToggleTable();">
     <p style='text-align:center'>Show Inactive EDB Appointments
     </p><!-- Added in closing tag -->
</a>

JavaScript

/* If using jQuery, this is an alternative to the onclick attr
// Set up event listener with jQuery, alternative to onclick
$(document).on("click tap","#togglelink",function() {
    ToggleTable();
});
*/