JSFiddle - React, Tailwind, and code Playground

by Abid Akhtar

HTML

<body>
   <h1> Hello world</h1>
   <div> This is the first text</div>
   <div class="selected"> This is the second text</div>
   <div> This is the last text</div>
</body>

CSS

h1
{
  border : 1px Solid Red;
}

div.selected
{
  border : 1px Solid Blue;
}

JavaScript

$('div').hide().filter('.selected').text('This is a new text').show();