JSFiddle - React, Tailwind, and code Playground

HTML

<p>
    <button value="this is the correct value">$(this).val()</button>
    <button value="this is the correct value">$(this).attr('value')</button>
    <button value="this is the correct value">this.getAttributeNode('value').value</button>
</p>

JavaScript

$(function() {
    $('button').click(function() {
        eval( 'alert('+$(this).text()+')' );
    });
});