jasonglisson
11/14/2014 - 3:24 PM

Javascript - Adjust div height based on viewport height

Javascript - Adjust div height based on viewport height

function viewport_height() {
      var window_height = $(window).height();
      $('#top-header').height(window_height);
}

viewport_height();

$(window).resize(function() {
  viewport_height();
});