JSFiddle - React, Tailwind, and code Playground

by naveennsit

HTML

<div  style="position:absolute; width:100%; height:800px; overflow:auto; -webkit-overflow-scrolling: touch;">
    
                         <i id="realTimeContents" class ="left realtimeContend_h" style="width:85%; float:right;">
                          
                             </i>
                            <i id="realTimeContents1" class ="left realtimeContend_h" style="width:9%; float:left;">
                            </i></div>

JavaScript

$(function() {
  var h = -1;

    var newHeight = $('#realTimeContents').height();
    if(h == -1) h = newHeight;
    if(h != newHeight) {
        h = newHeight;
        $('#realTimeContents1').append(" changed ");
    }

});

$(function() {
  var h = -1;
  setInterval(function () {
    var newHeight = $('#realTimeContents').append("Hiiiii.  is i am checking this in the div please check me also and everty thing is fine well know div").height();
    if(h == -1) h = newHeight;
    if(h != newHeight) {
        h = newHeight;
          $('#realTimeContents1').append(" changed ");
       //alert("I've changed height");
    }
  }, 1000);
});