JSFiddle - React, Tailwind, and code Playground

by Liam Talbot

HTML

<div class="wrapper">
    <div class="ebook">
         <div class="page">e-book</div>
    </div>

    <div class="book">
         <div class="page">book</div>
    </div>

    <div class="document">
         <div class="page">document</div>
    </div>
</div>

CSS

div[class$="book"] { 
    background-color: yellow;
}

JavaScript

$("span.LiveAgentStatusField").each(function(index) {
    alert('hi!');
            if ($(this).html() === 'online' || $(this).html() === 'Online') {
                $(this).css("color", "#0EBE5E");
            } else if ($(this).html() === 'offline' || $(this).html() === 'Offline') {
                $(this).css("color", "#ccc");
            }
        });