JSFiddle - React, Tailwind, and code Playground
by antyrat
HTML
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 1</li>
</ul>
JavaScript
$('ul > li').each(function(){
var current = this;
$('ul').find('li:contains(' + $(this).html() + ')').each(function(){
if(current != this) {
$(this).css('color', 'red');
}
});
});