JSFiddle - React, Tailwind, and code Playground

HTML

<div class="list">
    <a href="#" class="one">one</a>
    <a href="#" class="two">two</a>
    <a href="#" class="three">three</a>
</div>

<p class="output"></p>

JavaScript

$(document).ready(function() {
	$('.two').trigger('click');
    
    $('.list a').click(function(e){
        e.preventDefault();
        
        $text = $(e.target).text();
        $('.output').text($text);
        
    });
    
});