JSFiddle - React, Tailwind, and code Playground
HTML
<div id="container">
<strong>These are p tags, numbered 1 - 22.</strong>
<br/>
<br/> <br/>
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
<p>5</p>
<p>6</p>
<p>7</p>
<p>8</p>
<p>9</p>
<p>10</p>
<p>11</p>
<p>12</p>
<p>13</p>
<p>14</p>
<p>15</p>
<p>16</p>
<p>17</p>
<p>18</p>
<p>19</p>
<p>20</p>
<p>21</p>
<p>22</p>
</div>
CSS
#container {
color: white;
background-color: blue;
height: 400px;
overflow: hidden;
}
JavaScript
var h = $("body").height();
var hiddenEls = new Array();
$("#container").find("*").each(function(){
if ($(this).position().top > h)
hiddenEls.push($(this));
});
alert (hiddenEls.length);