JSFiddle - React, Tailwind, and code Playground

by thinkfast2008

HTML

<div id="div1">this divs height is equal to the viewport height</div>
<div id="div2">this divs height is equal to the viewport height</div>

CSS

div{
    background:orange;
    height:80px;    /* a default height */
    margin-bottom:20px;
}

JavaScript

$(document).ready(function(){
    $("div").each(function(i,v){
       $(this).css("height",$(window).height() + "px"); 
    });
});