JSFiddle - React, Tailwind, and code Playground
by David Thomas
HTML
<p data-ref="a custom data attribute.">Click for the custom data!</p>
JavaScript
$('p[data-ref]').click(
function(){
alert($(this).attr('data-ref'));
});
by David Thomas
<p data-ref="a custom data attribute.">Click for the custom data!</p>
$('p[data-ref]').click(
function(){
alert($(this).attr('data-ref'));
});