JSFiddle - React, Tailwind, and code Playground

HTML

<span id='test_span'>Testing jQuery</span>

JavaScript

$('#test_span').click(function () {

                //Read the elemnt's current value

                var element_text = $('#test_span').text();

                //display the curretn value of this span
                alert(element_text);

                //convert the value to upper case
                element_text = element_text.toUpperCase();

                //change the span to this new value
                $('#test_span').html(element_text);
            });