22 May 2019

html height mapping on two div in html and java script

  <div  style="overflow-y: visible;" class="blog-wrrp-inner1">
   Demo Content
  </div>
  <div  style="overflow-y: visible;" class="blog-wrrp-inner2">
    Demo Content
  </div>

<script type="text/javascript">

$(document).ready(function() {

var a=$('.blog-wrrp-inner1').height();
var b=$('.blog-wrrp-inner2').height();
 if(a>b)
 {
     $('.blog-wrrp-inner2').css('height',a);
 }
 else
 {
     $('.blog-wrrp-inner1').css('height',b);
 }
});
</script>