JSFiddle - React, Tailwind, and code Playground

by Thet Hlaing

HTML

<a class="test" href="#" data-type="type1">click here
</a> <br/>

<a href="#" data-type="type2" onclick='Delete();'>Delete
</a><br/>

<a class="test" href="#" data-type="type3">click here3
</a><br/>



<script>
    function Delete()
{
    alert('test');
};
</script>

JavaScript

$('.test').click(function(){
    var id= $(this).data('type');
    alert(id);    
    return false;
});