JSFiddle - React, Tailwind, and code Playground

HTML

<img src="check" class="fortipsy" />

JavaScript

$(".fortipsy").each(function () {
   alert(txt);
    var txt = $(this).attr(src);
    
   
});