Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Javascript library jQuery let's us to listen to the "resize" event of the browser window and calculate the height of the containers:

Code Block
languagejs
// execute function after page is loaded
$(function(){
  // the resize function
  function resize() {
    $('.page').css('height', $(window).height());
  }
  
   resize();// register the event handler
  $(window).on('resize', resize);
 
  // calculate initial height
  resize();
});