0

My users book an appointment on our website which changes the height of an iframe when the iframe has changed height I want to hide the above the iframe automatically. This is what I have so far the limitation is it only works on the following events but I want it to hide the dynamically rather than on page re-size or scroll as these events dont take place

$(window).on('load resize scroll', function() {
  if ($(".remove-text").height() >= 582) {
    $("#execphp-30, #execphp-47, #execphp-48").hide();
  } else {
    $("#execphp-30, #execphp-47, #execphp-48").show();
  };
});

I use the iframeresizer js plugin to detect dynamically update the height of the iframe

iTsHutchy
  • 1
  • 1

1 Answers1

0
<script>
jQuery(function($) {

$(window).on('DOMSubtreeModified', function() {
  if ($(".remove-text").height() >= 582) {
    $("#execphp-30, #execphp-47, #execphp-48").hide();
  } else {
    $("#execphp-30, #execphp-47, #execphp-48").show();
  };
});

});
</script>
iTsHutchy
  • 1
  • 1