JSFiddle - React, Tailwind, and code Playground

HTML

<button type="button" class="themeChanger" data-theme-value="grid" value="Grid">
   <img src="templateImages/Icon_200.png" />                
</button>

JavaScript

$(".themeChanger").click(function () { 
    alert($(this).attr("data-theme-value")); 
    alert($(this).data("theme-value")); 
        alert($(this).data("themeValue")); 
});