JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<div style="width:600px; height:100px; background-color:#0F3" id="a">some some some</div>

<div style="width:10px; height:150px; background:#FF9;" id="b">some b some b</div>


<div id="abs" style="width:10px;height:10px;background-color:#666;position:absolute;top:1000px" id="c">cc</div>
<div id="bastard">
<button id="but">Scan me</button>
<button id="but2" onClick="document.getElementById('abs').style.top='2000px';alert('changing the absolute div top: from 1000 to 2000')">move some obj</button>
<div style="width:20px; height:1000px; background-color:#0FF; margin-top:150px" id="d">
ddd</div></div>

JavaScript

var maxhabs = 0;
var maxhrel = 0;
var realh = 0;
var top=0;
var topbottom=0;
var off = document.body.offsetHeight; //get the offsetheight
$('#but').click(function(){
	$.each($('body *:not(script)'),function(index,value){//get all body elements
		if ($(this).css('position') == 'absolute'){//check for position absolute(the only that the browser ignore
			alert($(this).css('top')+'   '+$(this).css('bottom'));//check for top and bottom properties (and for every css properties that can move the object down)
			if(!isNaN($(this).css('top').replace('px',''))){//get max top or max negative bottom
				if(topbottom < $(this).css('top').replace('px','')){
					topbottom=$(this).css('top').replace('px','');
				}
			}
			if(!isNaN($(this).css('bottom').replace('px',''))){
				if(topbottom < (-$(this).css('bottom').replace('px',''))){
					topbottom=(-$(this).css('bottom').replace('px',''));
				}	
			}	
		}
	});
	//confront the height, get the higher
	maxhabs = topbottom;
	maxhrel = off;
	alert('offsetheight:'+off);
	alert('maxhabs:'+maxhabs);
	if(maxhrel>maxhabs){alert('higher:'+maxhrel)}else{alert('higher:'+maxhabs);}
});