JSFiddle - React, Tailwind, and code Playground

HTML

<div whatever="test">test it</div>

JavaScript

$( document ).ready(function() {
    console.log($('[whatever=test]').html());
});