JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<body>
<p id="hello">Hello World</p>
</body>
</html>
JavaScript
var elem = $("#hello");
elem.attr("foo", "bar");
elem.attr("empty", "");
alert(elem.is("[foo]")); // true on IE, true on Chrome
alert(elem.is("[empty]")); // false on IE, true on Chrome