Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Bootstrap parallax site..need JavaScript for window height Reply To: Bootstrap parallax site..need JavaScript for window height

#170604
shaneisme
Participant

In jQuery, you can use this: $(window).height(); to get the viewport height.

From there, you can set the height of your .hero something like this:

var viewport = $(window).height();
$('.hero').height(viewport);