JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<ul>
<li>The filter() method returns elements that match a certain criteria.</li>
<li>To specify multiple criteria, use comma.</li>
<li class = "filter">The filter() method is the opposite of the not() method.</li>
<li>The filter() method lets you specify a criteria.</li>
<li class = "filter"> The index position of the element in the set</li>
</ul>
</div>
CSS
div{
width:100%;
margin: 0 auto;
}
li{
font-size: 20px;
padding: 10px 5px;
list-style: none;
}
JavaScript
$(document).ready(function() {
$("li").filter(".filter").css({"color": "#ff3333", "border": "2px solid #1a0000"});
});