Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.     var resizeTimer;
  3.    
  4.     function resizeIFrame() {
  5.         // Ensure that top-bar is always ~46px tall. Allocate remainder to iframe using relative height.
  6.         var topbarHeight = (4600) / $(window).height();
  7.         $("iframe").css("height", (100 - topbarHeight) + "%");
  8.     };
  9.  
  10.     $(document).ready(function() {
  11.         $(window).resize(function() {
  12.             clearTimeout(resizeTimer);
  13.             resizeTimer = setTimeout(resizeIFrame, 500);
  14.         });                    
  15.        
  16.         resizeIFrame();
  17.     });                        
  18. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement