September 04, 2014
When working with background images, parallax websites, or full width and height sliders, you might find the need to have a div adjust to be the full width or height of the viewport automagically. This code will help you find your way. Sourced from the comments on css-tricks.com
function resizeDiv() { vpw = $(window).width(); vph = $(window).height(); $('.container_home').css({'100%': vph}); }