JSFiddle - React, Tailwind, and code Playground
by Wesley Smith
HTML
<button data-label-str="Open File">Give me a label please</button>
<p> </p>
<button data-label-str="Close Window">Give ME a label TOO please</button>
JavaScript
$(document).ready(function() {
$('button').click(function(){doLabel(this)});
});
function doLabel(e) {
$(e).html($(e).data('label-str'));
}