JSFiddle - React, Tailwind, and code Playground

by thecodeparadox

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!")
    });