JSFiddle - React, Tailwind, and code Playground
HTML
<a href="/foo.html" class="js-test" data-test-events="click mouseover">Test 1</a>
JavaScript
$('.js-test').on($('.js-test').data('test-events'), function() {
console.log("hello world!")
});