JSFiddle - React, Tailwind, and code Playground

by mynameisdonald

HTML

<div class="chatsystemmessage one">
<strong>Your Question:</strong>
Hello
</div>
<div class="chatsystemmessage two">Please wait, an operator will be with you shortly.</div>
<div class="chatsystemmessage three">You are now chatting with donald sutherland - General</div>


<div id="status"></div>

CSS

body{
    margin:40px;
}
.chatsystemmessage {
    background: none;
    border-bottom: 0px solid #CCCCCC;
    border-top: 0px solid #CCCCCC;
    color: #333333;
    font-size: 12px;
    margin-bottom:0;
    margin-top: 0;
    padding-bottom: 0;
    padding-left: 0;
    padding-top: 0;
    width:97%;
}

.chatsystemmessage strong{
background: rgb(247,247,247); /* Old browsers */
background: -moz-linear-gradient(top, rgba(247,247,247,1) 0%, rgba(242,242,242,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(247,247,247,1)), color-stop(100%,rgba(242,242,242,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(247,247,247,1) 0%,rgba(242,242,242,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(247,247,247,1) 0%,rgba(242,242,242,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(247,247,247,1) 0%,rgba(242,242,242,1) 100%); /* IE10+ */
background: linear-gradient(top, rgba(247,247,247,1) 0%,rgba(242,242,242,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7f7f7', endColorstr='#f2f2f2',GradientType=0 ); /* IE6-9 */
-webkit-border-top-left-radius: 3px;
-webkit-border-top-right-radius: 3px;
-moz-border-radius-topleft: 3px;
-moz-border-radius-topright: 3px;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
position:relative;
float:left;
width:100%;
padding:5px 1%;
border-top:1px solid #ddd;
border-left:1px solid #ddd;
border-right:1px solid #ddd;
}

JavaScript

$(document).ready(function(){
    $(".chatsystemmessage").each(function(e) {
        if ($(this,"strong").length){
            $(this).prepend("<strong>System Message</strong>");   
        } else {
            $
    });
});


  if ($('img').length) { // implies *not* zero
    log('We found img elements on the page using "img"');
  } else {
    log('No img elements found');
  }