JSFiddle - React, Tailwind, and code Playground

HTML

<div data-foo-name="bar"></div>

JavaScript

var div = $('div');
console.log(div.data());