JSFiddle - React, Tailwind, and code Playground

by kinopyo

HTML

<h2>use #id selector</h2>

<input type="text" id="foo" value="Text1" />
<input type="text" id="foo" value="Text2" />

<h2>use attribute selector *id=xx*</h2>

<input type="text" id="bar" value="Text3" />
<input type="text" id="bar" value="Text4" />
<input type="text" id="bar" value="Text5" />

JavaScript

$("#foo").css("background-color", "gray");
$("[id=bar]").css("background-color", "green");