JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://www.broofa.com/Tools/JSLitmus/JSLitmus.js"></script>
<div class="links">
<a id="firstLink" style="background-color: red;">hello</a>
<a style="background-color: red;">hello</a>
<a style="background-color: blue;">hello</a>
<a style="background-color: green;">hello</a>
<a style="background-color: red;">hello</a>
<a style="background-color: blue;">hello</a>
<a style="background-color: green;">hello</a>
<a style="background-color: red;">hello</a>
<a style="background-color: blue;">hello</a>
<a style="background-color: green;">hello</a>
<a style="background-color: red;">hello</a>
<a style="background-color: blue;">hello</a>
<a style="background-color: green;">hello</a>
<a style="background-color: red;">hello</a>
<a style="background-color: blue;">hello</a>
<a style="background-color: green;">hello</a>
<a style="background-color: red;">hello</a>
<a style="background-color: blue;">hello</a>
<a style="background-color: green;">hello</a>
<a style="background-color: red;">hello</a>
<a style="background-color: blue;">hello</a>
<a style="background-color: green;">hello</a>
<a style="background-color: red;">hello</a>
<a style="background-color: blue;">hello</a>
<a style="background-color: green;">hello</a>
<a style="background-color: red;">hello</a>
<a style="background-color: blue;">hello</a>
<a style="background-color: green;">hello</a>
<a style="background-color: red;">hello</a>
<a style="background-color: blue;">hello</a>
<a style="background-color: green;">hello</a>
<a style="background-color: red;">hello</a>
<a style="background-color: blue;">hello</a>
<a style="background-color: green;">hello</a>
<a style="background-color: red;">hello</a>
<a style="background-color: blue;">hello</a>
<a style="background-color: green;">hello</a>
<a style="background-color: red;">hello</a>
<a style="background-color: blue;">hello</a>
<a style="background-color: green;">hello</a>
<a style="background-color: red;">hello</a>
<a style="background-color:...
CSS
div.links {
display: none;
}
JavaScript
function searchAll() {
$("a").css("background-color");
}
function searchAllAndGetFirst() {
$("a:first").css("background-color");
}
function getFirstById() {
$("#firstLink").css("background-color");
}
JSLitmus.test("a", searchAll);
JSLitmus.test("a:first", searchAllAndGetFirst);
JSLitmus.test("#firstLink", getFirstById);