JSFiddle - React, Tailwind, and code Playground

HTML

<div onClick="javascript:getComments(this);" store-id="143568" class="CountryRow" style="padding: 4px;"><div class="flag flag_az"></div> &nbsp; Azerbaijan</div>

JavaScript

getComments = function(input) {

   fValue =  $(input).attr("store-id");

   alert('the ID :'+fValue);


   }