JSFiddle - React, Tailwind, and code Playground

by silkherb

HTML

<div id="content" style="display:none">**Content1 goes here**</div>
   <div id="content" style="display:none">Content2 goes here</div>
   <div id="content" style="display:none">Content3 goes here</div>
   <div id="content" style="display:none">Content4 goes here</div>
   <div id="content" style="display:none">**Content1 goes here too**</div>
   <div id="content" style="display:none">**Content1 goes here again**</div>
   <div id="content" style="display:none">Content4 goes here part 2</div>

JavaScript

var matches = $( "div:contains('Content1')" ).length;

   alert(matches);