JSFiddle - React, Tailwind, and code Playground

by ChrisStanyon

HTML

<div class="first" data-haus="1">First Placeholder</div>
<div class="second" data-haus="1">Second Placeholder</div>

JavaScript

var first = ( $(".first").data('haus') === "1" ) ? "Match" : "No Match";
var second = ( $(".second").data('haus') == "1" ) ? "Match" : "No Match";

console.log(first);
console.log(second);