JSFiddle - React, Tailwind, and code Playground

by gubhaju

HTML

<p id="id1" style="color:#DDD"> 
   Hey this is a <b id="id2" style="color:#FFF"> test</b> 
   So <span id="id3" style="background-color:#123"> have a nice 
        <span id="id4" style="color:#DDD">day </span>
      </span>
</p>

JavaScript

$('*').each(function(){ //alert($(this).css('color'))
    if( $(this).css('background-color') == "#123") {
        alert(this.id);   
    }
})